[lazarus] implementation
Michael Van Canneyt
michael.vancanneyt at wisa.be
Wed Apr 26 17:23:58 EDT 2000
On Wed, 26 Apr 2000, dvortex wrote:
>
> Can i do something like this:
>
> Object1 = record
> MasterValue : MasterType
> case Mastervalue
> mv1: SubValue: Boolean;
> mv2: SubValue: Integer;
> else: subvalue: TObject;
>
> Function GetValueAsString: String;
> end;
This should read
Type1 = Record
Case MasterValue : MasterType of
mv1: (SubValue: Boolean);
mv2: (SubValue: Integer);
end;
>
> ??
>
> can a record have a "case" for its properties ? (i beleive it does, i just
> want confirmation of it)
Yes, as you see, but no 'else' clause in the case.
> can a record have some functions/procedure in it ? (i beleive it does too,
> just didn't see it yet in the source files i looked at --not that
> many--.. :o)
A record cannot. An object/class can.
Michael.
More information about the Lazarus
mailing list