Hi, everybody!
trunkuti.pas: In function `Dectobin': trunkuti.pas:332: prior parameter's size depends on `Decinput' make.exe: *** [trunkuti.o] Error 1
I just fixed it. The problem is that the size of the `DecInput' parameter depends on its own actual value (the `Capacity' field of the string). Normally, GPC can handle this, but in this case, the second occurrence of
function DecToBin( DecInput : string ) : wrkstring;
affected the size of the string type in the *first* occurrence. When GPC recycled this first occurrence to define the function, throwing away the second one, the size of the string went to Nirvana.
Greetings,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201] maintainer GNU Pascal [970624] - http://home.pages.de/~gnu-pascal/ [970125]
Peter Gerwinski wrote:
Hi, everybody!
trunkuti.pas: In function `Dectobin': trunkuti.pas:332: prior parameter's size depends on `Decinput' make.exe: *** [trunkuti.o] Error 1
I just fixed it. The problem is that the size of the `DecInput' parameter depends on its own actual value (the `Capacity' field of the string). Normally, GPC can handle this, but in this case, the second occurrence of
function DecToBin( DecInput : string ) : wrkstring;
affected the size of the string type in the *first* occurrence. When GPC recycled this first occurrence to define the function, throwing away the second one, the size of the string went to Nirvana.
I imagine this would cause aborts under the right circumstances (eg the ReadStr instruction (in the real code)).
Could you please post the patch, as I need the fix, err, last Friday ;).
BTW, thank you for the quick fix.
Bill