Texas Instruments TI89 Developer Guide - Page 1177
varName, oldFolder, newFolder
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 1177 highlights
Appendix A: System Routines - Variables 1135 cmd_movevar Declaration: void cmd_movevar (EStackIndex varName, EStackIndex oldFolder, EStackIndex newFolder) Category(ies): Variables Description: Move a variable from one folder to another. This is the TI-BASIC command MoveVar. If the destination folder (newFolder) does not exist it will be created. Inputs: varName - ESTACK index of variable to move. oldFolder - Original folder. newFolder - New folder. Outputs: May throw these errors: ER_FOLDER ER_LOCKED ER_RESERVED ER_MEMORY ER_UNDEFINED_VAR - Destination folder name is invalid. - Destination variable is locked or in-use. - Cannot move reserved names. - Not enough memory to do the move. - Source variable not found. Assumptions: None Side Effects: May cause heap compression. Availability: On AMS 1.05 and higher. TI-89 / TI-92 Plus Differences: None See Also: TokenizeSymName, TokenizeName, cmd_newfold Example: This example passes direct pointers to 'tokenized' names instead of using TokenizeSymName. Compare this to the cmd_delvar example which uses TokenizeSymName or the VarRecall example which uses TokenizeName. const BYTE MainFolderName[6] = {0, 'm','a','i','n', 0}; const BYTE NewFolderName[10] = {0,'z','f','o','l','d','e','r','1',0}; const BYTE fName[4] = {0,'f','1',0}; if (FS_OK != FCreate("main\\f1", "DAT")) return; /* "main" is always reserved but since this code by-passes TokenizeSymName we must make sure our name "zfolder1" is not reserved. Adding a digit to the end will insure it does not conflict with any new reserved names added by a localizer. Since a tokenized name consists of a zero byte followed by the name followed by a zero byte, we can just pass a pointer to the second zero byte as the tokenized name. */ cmd_movevar( (BYTE *)fName+3, (BYTE *)MainFolderName+5, (BYTE *)NewFolderName+9 ); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/1177.png)