asc码
我只会用delphi支持到0-127,要显示128-255的字符怎么办???

解决方案 »

  1.   

    delphi有对位运算“左移”、“右移”、“取某一bit值”的函数么?
      

  2.   

    Returns the character for a specified ASCII value. UnitSystemCategorycharacter manipulation routinesDelphi syntax:function Chr(X: Byte): Char;DescriptionChr returns the character with the ordinal value (ASCII value) of the byte-type expression, X.
      

  3.   

    The following logical operators perform bitwise manipulation on integer operands. For example, if the value stored in X (in binary) is 001101 and the value stored in Y is 100001, the statementZ := X or Y;assigns the value 101101 to Z.Logical (bitwise) operators 
    Operator Operation Operand types Result type Examples
    not bitwise negation integer integer not X
    and bitwise and integer integer X and Y
    or bitwise or integer integer X or Y
    xor bitwise xor integer integer X xor Y
    shl bitwise shift left integer integer X shl 2
    shr bitwise shift right integer integer Y shr I
    The following rules apply to bitwise operators.The result of a not operation is of the same type as the operand.
    If the operands of an and, or, or xor operation are both integers, the result is of the predefined integer type with the smallest range that includes all possible values of both types.
    The operations x shl y and x shr y shift the value of x to the left or right by y bits, which (if x is an unsigned integer) is equivalent to multiplying or dividing x by 2^y; the result is of the same type as x. For example, if N stores the value 01101 (decimal 13), then N shl 1 returns 11010 (decimal 26). Note that the value of y is interpreted modulo the size of the type of x. Thus for example, if x is an integer, x shl 40 is interpreted as x shl 8 because an integer is 32 bits and 40 mod 32 is 8.
      

  4.   

    procedure TForm1.Button1Click(Sender: TObject);
    var
      d:byte;
      s:string;
    begin
      d:=222;
      s:=chr(d);
      showmessage(s);
    end;
      

  5.   

    扩展ASC码主要是用来组成汉字的,如果只显示1个,是看不出的。