I'm trying to update a previous game and am also making a game right now that has saving functionality. The issue is that I don't know how to rename a list and archive it from the program, and I want to be able to do this to keep the saves safe. Can anyone help me with this?
Thanks in advance.
In pure TI-BASIC, you cannot archive anything nor can you really rename it. Though, you can copy a list of data to a differently named list.

Edit:
Later posts invalidate mine, mentioning the fact that you can archive/unarchive variables
Brando is s correct in saying you can't really rename lists.
However you *can* (Un)archive them. Go to the memory management menu (with [2nd]>[+]) and select 'archive' then go to the list you want to archive and select it.
I.e.

Code:
Archive L1

The list will be archived when you run the program. The unarchive command works the same way.
I think brando got confused with (Un)archiving programs, you can't mess with the Archive status of programs in pure BASIC.
You can effectively rename a list by storing the old list into the new list and deleting the old list with DelVar, for example:
Code:
ʟABC→ʟDEF
DelVar ʟABC
Archive ʟDEF
Thanks for the different responses! A shame that there is no straight-forward way, but at least there is some way to do it.
Alright, I thought I can contribute to this topic by just giving a rough introduction to using lists to store data.

Whenever you need to create or use a list, you can use the SetUpEditor command.

It unarchives a list if it is archived and creates an empty list if it does not exist. Assuming your save data has a known length, you should use this code to initialize your list.

For demonstration purposes, I'm going to be naming your list ʟFOO and giving it a length of 10, but you can name it anything you want as long as it is shorter than 6 chars, the first character is an uppercase letter, and the rest of the chars are numbers and/or uppercase letters. The list length can be up to 999 elements.


Code:
SetUpEditor FOO
10→dim(ʟFOO


Note that you can omit the "ʟ" on the list name when using SetUpEditor and the ending parenthesis on the dim(). These are pretty simple optimizations to make your program smaller. If you want to see more of them, there's an excellent (albeit a bit lengthy) walkthrough that shows you the process behind optimizing a TI-BASIC program and some common optimizations.

Now that you have your list set up, you can read from it, write to it, etc. As jacobly showed above you can delete the list using DelVar ʟFOO.

When you are done modifying your list (and assuming you haven't delete it), you can archive it with Archive ʟFOO.

The benefit of archiving a list is that it's harder for an inexperienced user to accidentally (or intentionally) edit. They have to be clever enough to realize that they can unarchive the list and unfortunately this is a sufficient roadblock for many. It also won't get deleted if a RAM reset happens because of buggy Assembly programs, buggy TIOS, or whatever.

I hope this helps, if you need clarification or anything, feel free to ask Smile
_iPhoenix_ wrote:
Alright, I thought I can contribute to this topic by just giving a rough introduction to using lists to store data.

Whenever you need to create or use a list, you can use the SetUpEditor command.

It unarchives a list if it is archived and creates an empty list if it does not exist. Assuming your save data has a known length, you should use this code to initialize your list.

For demonstration purposes, I'm going to be naming your list ʟFOO and giving it a length of 10, but you can name it anything you want as long as it is shorter than 6 chars, the first character is an uppercase letter, and the rest of the chars are numbers and/or uppercase letters. The list length can be up to 999 elements.


Code:
SetUpEditor FOO
10→dim(ʟFOO


Note that you can omit the "ʟ" on the list name when using SetUpEditor and the ending parenthesis on the dim(). These are pretty simple optimizations to make your program smaller. If you want to see more of them, there's an excellent (albeit a bit lengthy) walkthrough that shows you the process behind optimizing a TI-BASIC program and some common optimizations.

Now that you have your list set up, you can read from it, write to it, etc. As jacobly showed above you can delete the list using DelVar ʟFOO.

When you are done modifying your list (and assuming you haven't delete it), you can archive it with Archive ʟFOO.

The benefit of archiving a list is that it's harder for an inexperienced user to accidentally (or intentionally) edit. They have to be clever enough to realize that they can unarchive the list and unfortunately this is a sufficient roadblock for many. It also won't get deleted if a RAM reset happens because of buggy Assembly programs, buggy TIOS, or whatever.

I hope this helps, if you need clarification or anything, feel free to ask Smile

I think you did an amazing job at explaining the process to me. Thanks! Very Happy

Just to clarify, this process will work on a TI-84 Plus CE, right? It's a stupid question, I know, but it's because I read about a similar process, tried it, but there was an invalid token, so I assumed it was meant for a TI-83.
This should work as-written regardless of calc (as long as we are still in TI-84 BASIC territory).

Be sure to use the actual ʟ token instead of the letter L. The list token is found after pressing [2nd], then [stat], then [↑] (up arrow), and [enter]. This is completely off the top of my head, it's probably wrong.
_iPhoenix_ wrote:
This should work as-written regardless of calc (as long as we are still in TI-84 BASIC territory).

Be sure to use the actual ʟ token instead of the letter L. The list token is found after pressing [2nd], then [stat], then [↑] (up arrow), and [enter]. This is completely off the top of my head, it's probably wrong.

It tells me that the ʟ token is invalid. What do I do?

Edit: I got the list to archive, which is good. I did want to name it so that people know what it's for, but what I have is better than nothing. Thanks for all the help, guys!
just a note: if you solved your issue, add [FIXED] to your topic title (edit 1st post, then type that into the title box) (If you didn't know how to do so already). the [FIXED] just lets ppl know that the issue/ question has been fixed/solved/answered
  
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
Page 1 of 1
» 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