你这个不会有问题吧,应该是type
myrec = record
a:pchar;
b:integer;
case b of //这里的integer是指什么呀?能具体讲个例子吗?
0:(...)
1:(...)
2:(...)
end;
意思是
当b=0时做
当b=1时做
myrec = record
a:pchar;
b:integer;
case b of //这里的integer是指什么呀?能具体讲个例子吗?
0:(...)
1:(...)
2:(...)
end;
意思是
当b=0时做
当b=1时做
MyRec=record
a:pChar;
b:integer;
case integer of
0: (i:integer);
1: (j:string);
end;
什么改什么名字,直接使用var
ivar:MyRec;
begin
ivar.j:=.......
...
end;
参考
type TPerson = record
FirstName, LastName: string[40];
BirthDate: TDate;
case Citizen: Boolean of
True: (Birthplace: string[40]);
False: (Country: string[20];
EntryPort: string[20];
EntryDate, ExitDate: TDate);
end;
myrec^b就是你的字段名字