[fpc-pascal]RE: Initializing record types (=?gb2312?B?SG93IHRv...)
Yet Another Geek
yetanothergeek at yahoo.com
Thu Aug 1 13:11:54 CEST 2002
> Could anybody tell me that how to assign all
values to a record
> typed variable? I mean that in C I can assign a
struct variable
Do you mean like this ?
program rectest;
type tMyRec = record
a, b : integer;
s: string[15];
end;
const
aMyRec: tMyRec = (a:16; b:37; s:'hello');
begin
with aMyRec do WriteLn(a, ':', b, ':', s);
end.
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
More information about the fpc-pascal
mailing list