On 23 Jan 2003, Richard D. Jackson wrote:
Found this small error in the Programming documentatin.
In section 7.1.3 Constant Declaration. Down about halfway on the page you wil find this
Furthermore, you can also assign initialization values to types:
program InitTypeDemo;
type MyInteger = Integer value 42;
var i: MyInteger;
begin WriteLn (i) end.
Here, all variables of type MyInteger are automatically initialized to 0 when created.
The variables are initialized to 42 not 0.
Ran program here, got 42
gpc -v: Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnu/3.2.1/specs Configured with: ../gcc-3.2.1/configure --enable-languages=pascal Thread model: posix gpc version 20021128, based on gcc-3.2.1
Don't remember when the change was made to gpc to include type initialization.
Russ