[fpc-devel]Weird isn't it ?
maly at zga.pl
Wed Feb 12 18:51:58 CET 2003
i wrote some unit to handle my own FS :> but that's not
important. well, i've got a constructor looking like this:
constructor CFile.Create(var AFS:CDataFile;APath:string);
var SavedPath : string;
if FIndex=0 then
raise EDataFileException.Create('file '+APath+'doesn''t exist');
if FFS.Header.Files[FIndex].IsCompressed then
this code is 100% correct, but in some specific circumstances
it works buggy, the variables(class's fields) have weird
values(like 0 or ''). when I uncomment the commented line
the results are ok. so how's that possible a writeln can
fix the code? it does only print the 'debug-info' :>? it
shouldn't change anything. the point is i don't need that
line infact i don't want it at all. :/
i guess it has something to do with optimiser.
i even triedthe latest snapshot from cvs - it didnt work out.
Help Plz :>.
Luke 'Maly' O.
More information about the fpc-devel