I'm having trouble using the ToggleSet command to turn a program into an appvar.

I am able to get an appvar from using this, but I am unable to turn it back into a program.

    -When I run the command to create the appvar, the appvar is created, program is deleted and the number 21 is returned.
    -When I try to turn the appvar back into a program, nothing happens and the string .7 is returned

Here is the code I used:

Code:
det(0,"A",2


Am I doing something wrong?
To turn an appvar back into a program, you need to prefix the name with the rowSwap( token before using that command, since that is the appvar identifier.

For more information, see the "Accessing Groups and Appvars" section of the Celtic III readme.

Your code would then look like this to turn AppVar "A" back into a program:


Code:
det(0,"rowSwap(A",2


EDIT: The string ".7" that is being returned indicates that the file you were looking for was not found. Indeed, prgmA was not found. When you ran it, it was appvar A.

For more information regarding error codes, see the "Error System Output" section of the Celtic III readme.
Thank you so much! I was wondering if there was a way to identify if something was an appvar, but I couldn't figure out what it was.

I will read through the Celtic III readme.
There isn't an easy way to check whether or not a file is an appvar, since both a program and an appvar of the same name can exist at the same time. It's best to keep track of the variables yourself whenever you mess with them.

The best way I can think of to solve the "is it an appvar or program?" problem is to use ToggleSet function 7 (Output stats) and if you get a "File Not Found" error (.7), then try again with the rowSwap( token in place. This can both determine if the file exists as an appvar or a program, or if the file exists at all.

EDIT: While we're at it, you might be able to get real-time help with problems if you join us on IRC either by logging onto EFNet and joining the #cemetech channel, or by using the SAX... thingie... located on the left side of the browser window. You may need to scroll down to see it.
No, I didn't mean to check if something was an appvar, but a way to tell the calculator that it is an appvar. (this is what rowswap( does)

Sorry for the confusion
  
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