unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
ord('A') ///这里居然错了 什么情况?
end;end.
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
ord('A') ///这里居然错了 什么情况?
end;end.
var
i: Longint;
begin
i:=Ord('A');
end;
showmessage(inttostr(ord('A')));
longint64位,
Statement expected, but expression of type 'Integer' found估计翻开任何一本讲delphi语法的书 都会在前几页找到答案你这样写 跟
procedure TForm1.Button1Click(Sender: TObject);
begin
'adsf';
end;有什么区别么?
你告诉我为什么procedure TForm1.Button1Click(Sender: TObject);
begin
'adsf';
end;
;
编译不通过 我就告诉你为什么procedure TForm1.Button1Click(Sender: TObject);
begin
ord('a');
end;
;
编译通不过
showmessage(inttostr(ord( 'A ')));
longint64位,解决了 谢谢