Hi, I'm brand new to PureBasic and I was wondering if there's an easier
workaround to finding the size of a variable with an array without manually multiplying the array size. PureBasic doesn't seem to have a UBound or LBound function either.
Ex.
Dim testarr.l(100)
;SizeOf(testarr) doesn't work so I just did 4*100
How to Get Size Of Variables with arrays
Hi lkd85:
To get the dimension of an array:
Regards - Einander
To get the dimension of an array:
Code: Select all
Dim testarr.l(100)
Debug PeekL(@testarr()-8)To get the total size of an Array in memory, you can also use this
little trick:
viewtopic.php?p=38916#38916
Timo
little trick:
viewtopic.php?p=38916#38916
Timo
quidquid Latine dictum sit altum videtur
Don't forget that Fred has said in a previous post that the native commands for the 3d engine are going to be re-visited and expanded upon for the future! The OGRE engine which is used by PB is no way near used to its fullest yet by PB (sparse command set). Hopefully this will change soon.PureBasic has almost(if not) everything I need for serious 3D gaming(which I plan to do) without the sacrifice of speed.



