FYI,
After a bit of fiddlling I've got record initialisers (initializers) to work. HP Pascal, DEC VMS Pascal and gpc all use different syntax. I don't suppose that it matters much as the code works, but gpc 20030323 (MinGW) gives warning:
"GPC currently ignores indices and field names in initializers"
Here is a demo program.
program test(input, output);
type tX = record a : integer; b : double; end;
type tAX = array[0..1] of tX;
var AX : tAX value [ 0: [a:5; b:6.00]; 1: [a:3; b:-8.0] ];
begin writeln(AX[0].a); writeln(AX[1].b); writeln("Finished"); end.
------------------------------------------------------------------- This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee, you must not use, retain or disclose such information.
NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses.
NPL Management Ltd. Registered in England and Wales. No: 2937881 Registered Office: Teddington, Middlesex, United Kingdom TW11 0LW. -------------------------------------------------------------------
Andrew Gregory a écrit:
FYI,
After a bit of fiddlling I've got record initialisers (initializers) to work. HP Pascal, DEC VMS Pascal and gpc all use different syntax. I don't suppose that it matters much as the code works, but gpc 20030323 (MinGW) gives warning:
"GPC currently ignores indices and field names in initializers"
Here is a demo program.
program test(input, output);
type tX = record a : integer; b : double; end;
type tAX = array[0..1] of tX;
var AX : tAX value [ 0: [a:5; b:6.00]; 1: [a:3; b:-8.0] ];
begin writeln(AX[0].a); writeln(AX[1].b); writeln("Finished"); end.
No more problem now (20030830)
Maurice