According to The African Chief:
It seems that one cannot have record fields pre-initialised to certain values (or am I missing something?) [...]
True. I agree that initalized record fields would be nice. (What does The Standard say about this, BTW?)
However you can initialize the whole record, like type constants in BP ... testing it ... uh - sorry, it does not work in fact! :-(
The following should work:
Var R: record foo: Integer; bar: Char; end (* R *) value ( foo: 42; bar: 'G' );
or, alternatively
Var R: record foo: Integer; bar: Char; end (* R *) value ( 42, 'G' );
Thanks for the bug report!
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201] maintainer GNU Pascal [970510] - http://home.pages.de/~gnu-pascal/ [970125]
Hello, Peter Gerwinski! You wrote:
[...]
True. I agree that initalized record fields would be nice. (What does The Standard say about this, BTW?)
However you can initialize the whole record, like type constants in BP ... testing it ... uh - sorry, it does not work in fact! :-(
The following should work:
Var R: record foo: Integer; bar: Char; end (* R *) value ( foo: 42; bar: 'G' );
or, alternatively
Var R: record foo: Integer; bar: Char; end (* R *) value ( 42, 'G' );
Thanks for the bug report!
No sweat! However, this would not do the job, if I am to be able to translate some of the cygwin32 structures. I *need* to be able to do something like;
Type r = record foo : integer value 24; bar : char value 'B'; end;
- there are several cygwin structures that need this :-(
Warmest regards, The Chief --------- Dr. Abimbola A. Olowofoyeku (The African Chief and The Great Elephant) Keele University, England (Email: laa12@cc.keele.ac.uk) Author of: Chief's Installer Pro v3.60 for Win16 and Win32 Homepage: http://ourworld.compuserve.com/homepages/African_Chief/