ussigned char *s  = var s :String>>  = shr
&   = and 
|   = or
<<  = shl

解决方案 »

  1.   

    procedure DoFirstChange(s:^char);
    var
      i,j:integer;
      t:array[0..7] of char;
    begin
       for i:=0 to 7 do
         t[i]:=0;
       for i:=0 to 7 do
         for j:=0 to 7 do
           t[7-j]:=//这里你的意思我不太清楚
    for i:=0 to 3 do
      begin
        s[i]:=t[2*i+1];
        s[i+4]:=t{2*i];
      end 
    end;
      

  2.   

    问题就在这句:
    t[7 - j] |= (unsigned char)(((s[i] >> j) & 0x01 ) << i);
      ‘|=’ ?= ‘xor'
      

  3.   

    procedure DoFirstChange(s:^char);
    var
      i,j:integer;
      t:array[0..7] of char;
    begin
       for i:=0 to 7 do
         t[i]:=0;
       for i:=0 to 7 do
         for j:=0 to 7 do
    t[7 - j] |= (unsigned char)(((s[i] >> j) & 0x01 ) << i);
           t[7-j]:=string(shl((shr(s[i],j) and $o1),i));
    for i:=0 to 3 do
      begin
        s[i]:=t[2*i+1];
        s[i+4]:=t{2*i];
      end 
    end;
      

  4.   

    procedure DoFirstChange(s:^char);
    var
      i,j:integer;
      t:array[0..7] of char;
    begin
       for i:=0 to 7 do
         t[i]:=0;
       for i:=0 to 7 do
         for j:=0 to 7 do
           t[7-j]:=string(shl((shr(s[i],j) and $o1),i));
    for i:=0 to 3 do
      begin
        s[i]:=t[2*i+1];
        s[i+4]:=t{2*i];
      end 
    end;
      

  5.   

    ':=' 能与 '|='相等吗?我认为还是不对! 
     请Help Me!
      

  6.   

    kenns2000:有下面错误
    [Error] Unit2.pas(76): Identifier expected but '^' found
    [Error] Unit2.pas(82): Incompatible types: 'Char' and 'Integer'
    [Error] Unit2.pas(85): Expression expected but 'SHL' found
    [Error] Unit2.pas(85): Array type required
    [Error] Unit2.pas(86): ';' expected but 'FOR' found
    [Error] Unit2.pas(88): Undeclared identifier: 's'
    [Error] Unit2.pas(96): Unexpected end of file in comment started on line 89
    [Error] Unit2.pas(97): 'END' expected but end of file found
    [Fatal Error] Project1.dpr(6): Could not compile used unit 'Unit2.pas'
      

  7.   

    |= 或等于的意思
    eg:
    a |= 1; 可以写成 a := a or 1;
      

  8.   

    a|=b 等于a=a|b 
    也就是:a=a or b
      

  9.   

    unsigned char* s ---》  s:^char 这样好象不行,在执行体中不认,请各位继续Help Me?
      

  10.   

    unsigned char* s ---》  s:pchar;
      

  11.   

    用 Var s:PChar或var s:String都行