Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: waggyner on July 01, 2014, 01:04:48 pm

Title: Axe Parser List issues
Post by: waggyner on July 01, 2014, 01:04:48 pm

I'm making an RPG like game game and I was thinking I could store the character stats as a list. I know I cannot use L1-L6 so I was just planning on making a custom list.
The problem is that axe says there is a token issue when compiling the code. I know I could use lists in basic but did axe change the way lists work?


In the code I had
{1,2,3}->LTEST
(that is the list L not a capital L)
Title: Re: Axe Parser List issues
Post by: Hayleia on July 01, 2014, 01:13:32 pm
Read the Commands.html. Lists don't exist in Axe.
However, pointers to RAM exist, and there are some RAM areas available. Some of those areas even have predefined pointers, such as... L1-L6.

The area pointed by L1 for example is 768 byte large. Probably enough for your uses. You can do 1→{L1+0} and 2→{L1+1} for example, or 512→{L1+0}r and 1024→{L1+2}r.
Title: Re: Axe Parser List issues
Post by: Runer112 on July 01, 2014, 01:29:48 pm
Read the Commands.html. Lists don't exist in Axe.

I'd actually recommend reading the Documentation.pdf file instead. The command list is full of great information if you know generally how the language works, but basic concepts like how to store and retrieve data are best learned from the base documentation.

But after you've read the Documentation.pdf file, skimming through the Commands.html file is definitely still a good idea.
Title: Re: Axe Parser List issues
Post by: waggyner on July 01, 2014, 02:13:59 pm
such as... L1-L6.

The area pointed by L1 for example is 768 byte large. Probably enough for your uses. You can do 1→{L1+0} and 2→{L1+1} for example, or 512→{L1+0}r and 1024→{L1+2}r.


how would i check values later? for example checking the second position of L1?
Title: Re: Axe Parser List issues
Post by: Sorunome on July 01, 2014, 02:15:25 pm
{L1+1}
now you read one byte past L1
Title: Re: Axe Parser List issues
Post by: waggyner on July 01, 2014, 05:00:56 pm
say i store 4 numbers to L1
1->{L1+0}
2->{L1+1}
3->{L1+2}
4->{L1+3}


and then said
if {L1+2}=3
do code


wouldn't the calculator return '34' because its starting at position 3 and continuing?


also would there be any problems when storing 2 digit numbers to L1?
25->{L1+1}
Title: Re: Axe Parser List issues
Post by: MGOS on July 01, 2014, 05:16:08 pm
The curly bracket operator {addr} only returns the single byte at the address you want. Each element of the array ("list") is one byte large, so it can store numbers from 0 to 255.
Title: Re: Axe Parser List issues
Post by: waggyner on July 01, 2014, 05:28:55 pm
The curly bracket operator {addr} only returns the single byte at the address you want. Each element of the array ("list") is one byte large, so it can store numbers from 0 to 255.


oh. thank you!