delphi中如何定义一组变量?比如定义一个叫person的变量,其中包括,身高(整数型)、体重(整数型)、性格是否内向(布尔型)、爱好(字符串)。
定义person之后可以这样用的
xiaoming:=person;
with xiaoming do
begin
tall:=178;
weight:=60;
style:=Flase;
hobby:='唱歌,下棋';
end;
其实我就是想储存一系列的字符串和整数数据在程序中,便于调用,我想知道怎么储存...
如何在delphi中存储一些数据,就比如上面说的,把xiaoliang,xiaogang,xiaohong……的属性在程序中储存,而通过下拉列表触发xiaoming事件将储存的xiaoming数据显示在demo控件中?还有就是如何在程序中储存多张图片以供调用(不是直接显示在窗体上)
I am a new man ...thanks a lot for your hot heart..
定义person之后可以这样用的
xiaoming:=person;
with xiaoming do
begin
tall:=178;
weight:=60;
style:=Flase;
hobby:='唱歌,下棋';
end;
其实我就是想储存一系列的字符串和整数数据在程序中,便于调用,我想知道怎么储存...
如何在delphi中存储一些数据,就比如上面说的,把xiaoliang,xiaogang,xiaohong……的属性在程序中储存,而通过下拉列表触发xiaoming事件将储存的xiaoming数据显示在demo控件中?还有就是如何在程序中储存多张图片以供调用(不是直接显示在窗体上)
I am a new man ...thanks a lot for your hot heart..
TPerson = record
tall: Integer;
weight: Integer;
style: Boolean;
hobby: string;
end;var
xiaoming: TPerson; // 或声明为数组
begin
with xiaoming do
begin
tall := 178;
weight := 60;
style := False;
hobby := '唱歌,下棋';
end;
end;