Page 1 of 1

A new data type, int (.i)

Posted: Sat Jun 10, 2006 7:32 am
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.

Posted: Sat Jun 10, 2006 6:08 pm
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).