New FreeBASIC beginners website

General discussion for topics related to the FreeBASIC project or its community.
Franktic
Posts: 18
Joined: Nov 24, 2016 2:35

Re: New FreeBASIC beginners website

Post by Franktic »

Thanks for the explanation. I have posted your explanation on the blog post, I hope you don't mind.
fxm
Moderator
Posts: 12107
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: New FreeBASIC beginners website

Post by fxm »

St_W wrote:... Integer is especially tricky because it is 32-bits on a 32-bit platform and 64-bits on a 64-bit platform. That is why one should be very careful when using Integer. If you want a fixed-size data type (like for writing something to a file, which should not be platform dependent usually) use e.g. Long or (better readable) Integer<32>.
On the other hand, it is not because one reduces the size of the variable used ("Byte" for example) compared to the basic size "Integer" (32 bits or 64 bits depending on the platform) that this improves the execution speed (on any platform). The only speed gain would be if one goes from a 64-bit variable to a 32-bit variable on a 32-bit platform.
Post Reply