Faster way of creating tables
Posted: Thu Dec 01, 2011 12:35 am
Let´s imagine I want a table mytable={x=0,y=0,fire=0,etc,etc}
If I try to get more tables like that with index to can write
mytable.x=100 (for example)
we have to write
mytable={{x=0,y=0,fire=0,etc,etc},{x=0,y=0,fire=0,etc,etc},{x=0,y=0,fire=0,etc,etc}} and so on...very tedious...
Is there a way to do something similar to STRUCT in C or NEWTYPE in Amiblitz?
Is there a way to do it in a better/faster form? Am I too old to learn?
Thanks!
If I try to get more tables like that with index to can write
mytable.x=100 (for example)
we have to write
mytable={{x=0,y=0,fire=0,etc,etc},{x=0,y=0,fire=0,etc,etc},{x=0,y=0,fire=0,etc,etc}} and so on...very tedious...
Is there a way to do something similar to STRUCT in C or NEWTYPE in Amiblitz?
Is there a way to do it in a better/faster form? Am I too old to learn?
Thanks!