Hello,
When going through the GPC Online manual, I encountered a mistake in section: 7.1.3 Constant Declaration.
It is in the following lines:
" 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 mistakes in the line that says, "Here, all variables of type MyInteger are automatically initialized to 0 when created.", which is not the case. All variables of type MyInteger when created will be initialized to 42, not 0. So, the corrected statement might look like: "Here, all variables of type MyInteger are automatically initialized to 42 when created."
Muhammad Umer Mansoor mansoorm@cpsc.ucalgary.ca
Muhammad Umer Mansoor wrote:
The mistakes in the line that says, "Here, all variables of type MyInteger are automatically initialized to 0 when created.", which is not the case. All variables of type MyInteger when created will be initialized to 42, not 0. So, the corrected statement might look like: "Here, all variables of type MyInteger are automatically initialized to 42 when created."
Thanks. Incidentally, someone else has reported the same problem the other day. It will be fixed with the next update.
Frank