I am trying to translate a program from Pascal to C. However some statement in pascal confused me and i am not to sure what should I be using instead.
The statement in question is:
Code:
case form: typform of
scalarfrm: ();
subrangfrm: ( rangtyp: typtabptr;
min,
max: constrec);
enumfrm: ( maxenum: 0 .. 255);
arrayfrm: ( elemtyp,
indxtyp: typtabptr);
recordfrm: ( lastfld: symtabptr;
recvrnt: typtabptr);
tagfrm: ( tagfldp: symtabptr;
fstvarnt: typtabptr);
varntfrm: ( nxtvarnt,
subvarnt: typtabptr;
varntval: constrec);
setfrm: ( seteltyp: typtabptr;
maxelem: integer);
filefrm: ()
Now the main issues is the first line form: typform to me is a structure type but again i am not sure if i should be implementing a union, or a case statement
Thanks