Hello all, I'm trying to convert some structures, and need some help.
If I have a record like so;
type
Sample = Record
Value1: Byte;
String1: String;
Value2: Word;
String2: String
end;
and I wanted to add one more element to the end of it, but the element must
be a case reliant on Value1. For instance, if Value1 = 1 then the element
should be V1, if Value1 = 2 then the element should be V2.
From what I understand, this is what I'm looking for, but it says Case
*INTEGER* of. When I tried 'Case Value1 of' I got an error.
stamp_combo=Record
Case Integer Of
0:(ldate:Longint);
1:(msg_st:_Stamp);
2:(dos_st:_Dos_St);
end;
Stewart Honsberger,
blackdeath@tinys.oix.com
... PASCAL programmers are blind - they do not C!
-!- GOPGP v1.11
--- Squish/386 v1.11
---------------
* Origin: Blackdeath BBS - Private (1:229/604)
|