解决方案 »

  1.   

    另有inttobin八进制的我就不知道了
    自己写吧,呵呵
      

  2.   

    The IntToStr does only decimal, so simply use this quick functions.const HexDigs: array [0..15] of char = '0123456789ABCDEF';function HexByte(b: Byte): string;
    var bz: Byte;
    begin
    bz:= b and $F;
    b:= b shr 4;
    HexByte:= HexDigs[b] + HexDigs[bz];
    end;function HexWord(w: Word): string;
    begin
    HexWord := HexByte(HI(w)) + HexByte(LO(w));
    end;function HexLong(l: Longint): string;
    var x: record
            case Boolean of
            true: (a: Longint);
            false: (l, h: Word);
          end;
    begin
    x.a := l;
    HexLong:= HexByte(HI(x.h)) + 
              HexByte(LO(x.h)) + 
              HexByte(HI(x.l)) + 
              HexByte(LO(x.l));
    end (*HexWord*);In HexLong we use another pascal feature, called "the old case trick". In Pascal, it is possible to declare a record with a case statement. The compiler puts all variables declared in the case statement to the same adress, so in case of cases 8-) we can treat the variable as we like it. Here we put a longint and two word on each other, so we can write in the long value and read out as two words. 
      

  3.   

    十进制转为二进制 inttobin好像有点不对哦