Join us on Discord!
You can help CodeWalrus stay online by donating here.

I need help with Axe Parser [Can I Axe you a question?]

Started by CKH4, January 06, 2015, 09:49:36 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

CKH4

My thought would be that I can do it without using any other variables. Is there a way to do a for loop counting between [r#] variables?
Also I'll add that joke as a topic tag.
  • Calculators owned: TI-83+, TI-84+


Hayleia

I don't think it's possible indeed. But maybe what you can do is put a last argument at 0, like SOMETHING(A,B,C,0), then your code loops from °r1 to °r6 and stops at the first pointer that contains 0 ? It is only a little bit smarter than having an argument describing how many arguments there are though.
The other solution being what @Cumred_Snektron said, filling a buffer with your arguments then having the routine read that buffer, which allows for a lot more arguments by the way.

CKH4

Thanks hayleia. That is what I'm doing right now except hopefully saving a few bytes by using r2 to describe the height of the box and how many arguments there are. I'm a slight bit confused buff(, what exactly does it do? Does it set a blank spot in ram that you can store as a variable?

Is it best practice to delete user variables at the end of your program or are they automatically cleaned or does it not even matter?
  • Calculators owned: TI-83+, TI-84+


Snektron

User variables? you mean appvars or vars like A and theta?
also buff( just makes a x long area of 0's on your program
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


CKH4

Like ones that you have to define with °.
  • Calculators owned: TI-83+, TI-84+


Snektron

Nah they are just in some ram area, if something needs their place it just overwrites them, so you can just leave them be
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Powered by EzPortal