A new data type, int (.i)

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

A new data type, int (.i)

Post by Dare »

Just thinking that for a future release of PureBasic a new integer data type, Int (.i) might be nice.

Ints would default to whatever was most appropriate for the platform. So an int might be 32 bits or 64 bits or whatever. In other words, they would not have a fixed size, to get size SizeOf(Int) would be required.

Programmers could then use the things like, um, *p.i knowing that it would be the best choice for the platform they're using. And porting code would keep it that way.
Dare2 cut down to size
remi_meier
Enthusiast
Enthusiast
Posts: 468
Joined: Sat Dec 20, 2003 6:19 pm
Location: Switzerland

Post by remi_meier »

I think a pointer will fit the job :)
http://www.purebasic.fr/english/viewtop ... 8820#48820
Fred wrote:When you declare a variable with an '*', it's a pointer, which means it will be always the size of the CPU address mode (4 bytes on 32 bits CPU and 8 bytes on 64 bits one for example).
Athlon64 3700+, 1024MB Ram, Radeon X1600
Post Reply