陈
陈冲伟
Unregistered / Unconfirmed
GUEST, unregistred user!
我定义了两个记录类型:
TDate = record
Year: Integer;
Month: (Jan, Feb, Mar, Apr, May, Jun,
Jul, Aug, Sep, Oct, Nov, Dec);
Day: 1..31;
end;
和
TInfo = record
Name: string;
Date: TDate;
end
现在想定义一个TInfo的常数DefaultInfo
其中的缺省值为: DefaultInfo.Name := 'noname';
DefaultInfo.Date.Year := 2001;
DefaultInfo.Date.Month := Jan;
DefaultInfo.Date.Day:= 1;
应该怎么写?
TDate = record
Year: Integer;
Month: (Jan, Feb, Mar, Apr, May, Jun,
Jul, Aug, Sep, Oct, Nov, Dec);
Day: 1..31;
end;
和
TInfo = record
Name: string;
Date: TDate;
end
现在想定义一个TInfo的常数DefaultInfo
其中的缺省值为: DefaultInfo.Name := 'noname';
DefaultInfo.Date.Year := 2001;
DefaultInfo.Date.Month := Jan;
DefaultInfo.Date.Day:= 1;
应该怎么写?