EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Developer's Guide

Texas Instruments TI-89
1398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1173 background imageLoading...
Page #1173 background image
Appendix A: System Routines — Variables
1131
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
cmd_copyvar
Declaration:
void
cmd_copyvar
(EStackIndex
OldSym
, EStackIndex
NewSym
)
Category(ies):
Variables
Description:
Copy a variable. This is the TI
-
BASIC command CopyVar. As specified in
section
13.3. Managing Variables
, these routines should be used instead
of the low-level Symbol Table routines.
Inputs:
OldSym
EStackIndex of source variable.
NewSym
EStackIndex of destination variable.
Outputs:
May throw these errors (plus any that
VarRecall
or
VarStore
might throw):
ER_VAR_IN_USE Source/destination is in-use.
ER_DUPLICATE_VAR_NAME Destination same as source.
ER_UNDEFINED_VAR Source variable not found.
ER_PROTECTED Invalid copy to a system variable.
ER_MEMORY Not enough memory for copying.
Assumptions:
None
Side Effects:
May cause heap compression.
Availability:
On AMS 1.05 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: VarRecall, VarStore, TokenizeSym, TokenizeName
Example:
This example copies the variable
sourceName
to
destName
.
EStackIndex esSource, oldTop = top_estack;
BYTE sourceName[MAX_SYM_LEN], destName[MAX_SYM_LEN];
TRY
if (TokenizeSymName( sourceName, 0 ) == NULL)
ER_THROW( INVALID_PATHNAME_ERROR );
esSource = top_estack;
if (TokenizeSymName( destName, 0 ) == NULL)
ER_THROW( INVALID_PATHNAME_ERROR );
cmd_copyvar( esSource, top_estack );
top_estack = oldTop; /* restore top of ESTACK */
ONERR
top_estack = oldTop; /* restore top of ESTACK */
PASS; /* pass error on up to caller */
ENDTRY

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals