so if for the first two numbers you would do {p}r, then for the first three would you do {p}r+1? or would that display numbers 2 and three? Also, how would you make an appvar that has three spaces. I know to do one, you would have to do:

Code:
:"appvarABC"->Str1
:GetCalc(Str1,2)

but to make three, would it have to be Getcalc(Str1,6)?

EDIT: Post 100! YAY! Laughing
If you are fine with using only numbers between 0-255, you only have to allocate that many bytes.
So in other words, I just have to change the 2?

EDIT: Oh, and could someone explain how the axe number system works? I don't quite understand how it works...
bspymaster wrote:
so if for the first two numbers you would do {p}r, then for the first three would you do {p}r+1? or would that display numbers 2 and three? Also, how would you make an appvar that has three spaces. I know to do one, you would have to do:

Code:
:"appvarABC"->Str1
:GetCalc(Str1,2)

but to make three, would it have to be Getcalc(Str1,6)?

EDIT: Post 100! YAY! 0x5


That's one way of allocating memory. Another way would be to do this (assuming L1 isn't being used):


Code:
0 -> {L1}
Fill(L1,Size-1)


with size being the amount of memory in L1 you want to start as a clean slate. If you allocate 2 bytes of memory, you can work with either one 16 bit value, or two 8 bit values, depending on how you access the data Wink
Why would you have to subtract one from the size?
EDIT: How do know whether I'm using 8 or 16 bit?
because it fills in all of the bytes after that byte Wink if you did just Fill(L1,Size) then it would allocate the amount of data you asked for + 1.
so if fill(L1,2+1) creates a list in L1 that is 2 spaces long, then how would I store variables there?
Fill(L1,1) creates a list 2 spaces long Wink and first you have to do 0->{L1}. You can access the first byte like {L1}, the second as {L1+1}, etc.
I can do the same thing with my own List right? And this list will actually exist right? not just like those variables where they don't actually exist? so I can recall the list for a high score?
L1 is a pointer to a chunk of SafeRAM, and it will most likely be overwritten when running another program. It's used for storing data that is used often in your program, or for creating temporary data structures. If you want to use one of the OS's list variables, you would have to do GetCalc("L1")->A", to store the pointer to the variable L1 in A. Then, with that pointer, you can store values in the list. Also, values in TI-OS lists are stored in TI's 9-byte floating point format.
So to store and recall numbers in the OS's list, I do the same thing as mentioned above?
No, you're missing the point. L1 in Axe isn't the same as L1 in TI-Basic. To store values in a TI-OS list, you will have to GetCalc() the name of the list, and store your data in it using TI's 9 byte floating point number format.
Don't forget. I started learning this kind of stuff a few weeks ago! How do I use the 9 byte floating point format? Or could you direct me to a tutorial?
I just realized that the easiest way to concatenate strings is a LOT easier with a memcop command Razz


Code:
Lbl SCP
Copy(r2,length(r1)+r1,length(r2))
Return


Kinda makes my other attempt look really stupid.
wait... What does that do? And what is concatenating?
basically it would take pointers to strings, and put them together one after the other Smile in BASIC, it's the same as doing Str1+Str2.
Concatenating is augmenting two strings together. For example, the TI BASIC code "Hello"+"World"→Str1 will put "HelloWorld" in Str1.
Oh. got it. sorry about that. what is the key for copy on calc?
It's conj(), found in MATH.
I don't remember offhand, but in the catalog it's one of the first ones under "c".
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page Previous  1, 2, 3, ... 10, 11, 12  Next
» View previous topic :: View next topic  
Page 2 of 12
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement