On 15/10/15 16:58, Dennis wrote: > > Perhaps the compiler should have a warning when defining a sub-range > field in class, telling users that it will be default to 0. >
Hi, The problem is not restricted to classes. Type TSmall = 4..12; Var B : TSmall; ... Writeln (B): Shows the same issue. Takes default value of zero; no range check on the first writeln. Regards, Peter _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal