delphi语法类型

代码
 1 unit Unit1;
 2 
 3 interface
 4 
 5 uses
 6   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 7   Dialogs, StdCtrls;
 8 
 9 type
10   TForm1 = class(TForm)
11     Button1: TButton;
12     procedure Button1Click(Sender: TObject);
13   private
14     { Private declarations }
15   public
16     { Public declarations }
17   end;
18 
19 var
20   Form1: TForm1;
21 
22 implementation
23 
24 {$R *.dfm}
25 
26 procedure TForm1.Button1Click(Sender: TObject);
27 var
28 i,j:integer;
29 r:real;
30 ch:char;
31 s:string[7];
32 begin
33 i:=10;
34 j:=100;
35 r:=1.0;
36 ch:='b';
37 s:='1234567890';
38 showmessage(inttostr(i)+inttostr(j));
39 showmessage(floattostr(r));
40 showmessage(ch);
41 showmessage(b);
42 end;
43 end.
44 

 

posted @ 2009-12-09 23:37  懒人博客  阅读(147)  评论(0)    收藏  举报