Unlimited amount of structure level for SizeOf(), etc.

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Unlimited amount of structure level for SizeOf(), etc.

Post by Psychophanta »

Since SizeOf() and others are runned at compile time, please perform it for an undefined amount of structure level for SizeOf(), etc.
Visual sample (btw; it ends in a "syntax error" as you can test yourself):

Code: Select all

Structure Person
  Name.s
  ForName.s 
  Age.w 
EndStructure
Structure Alien
  Age.q
  eon.Person
EndStructure

John.Person\Name = "John"
uhu.Alien\Age = 50000

Debug SizeOf(John\Age)

Debug SizeOf(uhu\Age)
Debug SizeOf(uhu\eon\Age); <- syntax error ! ? :(
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;