[fpc-pascal] New Warnings with fpc >= 3.2.0 (fredvs)
fredvs
fiens at hotmail.com
Sat Mar 14 13:01:13 CET 2020
Hello BrunoK
>so a field in an object is by default initialized to tak_none during the
> object's creation.
Hum, doing this:
_________________
PROGRAM enumtest;
type
tabulatorkindty =
(tak_none,tak_left,tak_right,tak_centered,tak_decimal);
var
kind: tabulatorkindty;
begin
if kind = tak_none then
WriteLn('OK it is tak_none')
else WriteLn('No is is not tak_none') ;
end.
______________________
Gives as result:
$ enumtest
OK it is tak_none
_____________________
So, thanks for the tip, "kind" seems indeed initialized with first item.
And with your tip, one more candidate for code to choose/use to fix the bug.
Many thanks BrunoK.
Fre;D
-----
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
More information about the fpc-pascal
mailing list