//指针的运算仅对 PChar 类型
procedure TForm1.Button1Click(Sender: TObject);
var
  p: PChar;
begin
  p := 'China';
  Inc(p);
  p := p + 1;
  ShowMessage(p);  //返回:ina

  Dec(p);
  p := p - 1;
  ShowMessage(p);  //返回:China
end;
posted on 2007-11-30 21:19  万一  阅读(3999)  评论(4编辑  收藏  举报