PB4.02 Win32 - Stuff in the executeable

Everything else that doesn't fall into one of the other PB categories.
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

PB4.02 Win32 - Stuff in the executeable

Post 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...
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

deja vue... :roll:
quidquid Latine dictum sit altum videtur
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post 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... ;)
oh... and have a nice day.
Post Reply