Hello Peter,
the initializer syntax in my example is compatible with the old DEC VMS Pascal style. They have implemented the standard now, which is record-type[field-name:value,...]. I've seen this syntax in parse.y but it seems to be disabled. I can live with either style, because I have written a DEC Pascal to GNU Pascal translator. I just need a working initialization feature.
Peter Dietrich
Peter Gerwinski peter@gerwinski.de am 16.06.99 22:01:05
An: Peter Dietrich/SYNSTAR/DE, gpc@gnu.de Kopie: Thema: Re: GPC BUG: Initializer for tagged variant records does not work
Hallo, Peter!
I found the following bug in the Beta version of GPC.
Thanks for the detailed bug reports. They really help us getting rid of the bugs.
Variant records with tag fields cannot be initialized. The following program is not accepted by the compiler:
program test (output);
type t = record f1 : integer; case tag : integer of 0: (i : integer); 1: (r : real); end;
var r : t value (1, 1, 3.14);
Is this syntax compatible to any other compiler, or are we free to define this?
Peter
-- Peter Gerwinski, Essen, Germany, http://home.pages.de/~Peter.Gerwinski/ Maintainer GNU Pascal - http://home.pages.de/~GNU-Pascal/ - gpc-19990118 PGP key on request - 6C 94 45 BE 28 A4 96 - 0E CC E9 12 47 25 82 75 *** Vote against SPAM! ********* http://www.politik-digital.de/spam/ ***