Cmd_Movevar - Texas Instruments TI-89 Developer's Manual

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Appendix A: System Routines — Variables

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
oldFolder
newFolder — New folder.
Outputs:
May throw these errors:
ER_FOLDER
ER_LOCKED
ER_RESERVED
ER_MEMORY
ER_UNDEFINED_VAR
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] =
const BYTE fName[4] =
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
— ESTACK index of variable to move.
— Original folder.
{0,'z','f','o','l','d','e','r','1',0};
{0,'f','1',0};
Not for Distribution
— 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.
1135
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents