Page 1 of 1

PB4.02 Win32 - Stuff in the executeable

Posted: Tue Dec 26, 2006 2:34 am
by va!n
Before i start, i am sure some people dont want read once again a topic about this posted by me. However, it would be nice if even this guys could take a closer look about the stuff i try to explain. Thanks for this in advance.

Since over 6 month i noticed something curious inside created executeable files, even with the latest PB v4.02 version. Just try to compile following small codeline and create an executeable:

Code: Select all

a.s = "" + Str(2)
If you take a closer look to inside the executeable file, you will notice an bigger nearly empty part. But inside this part you can read the string value "2147483648" also "$80000000" !! Seems there will be added an extra complete empty 512 byte allignment to the file.

Image

What could this be and why does it happens? This only happens, when using the Str() command somewhere in your project! Seems the stringvalue is the max limit for the Str() command to convert. Just try this and you see what i mean:

Code: Select all

a.s = "" + Str(2147483647)
Debug a.s

a.s = "" + Str(2147483648)
Debug a.s
Maybe the PB team can change/update the Str() routine like it happens on StrF(), StrD(), StrQ() !? :) Thanks for reading...

Posted: Tue Dec 26, 2006 4:31 am
by freak
deja vue... :roll:

Posted: Tue Dec 26, 2006 7:31 am
by Kaeru Gaman
like I already wrote quite a while ago,
my theory is, that it is a compare-sting for the Str()-Function.
since the conversion of a larger string would not fit into LONG,
it's not possible to convert it first and check for overflow afterwards.

...but it would be nice to know if i got even close to the true reason... ;)