EasyManua.ls Logo

Texas Instruments TI-89 - Cmd_Newfold

Texas Instruments TI-89
1398 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1136
Appendix A: System Routines — Variables
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
cmd_newfold
Declaration:
void
cmd_newfold
(EStackIndex
foldName
)
Category(ies):
Variables
Description:
Create a new folder. This is the TI
-
BASIC command NewFold.
Inputs:
foldName
EStackIndex of folder name to create.
Outputs:
May throw these errors:
ER_RESERVED Reserved name.
INVALID_PATHNAME_ERROR Name contains another folder name
(nested folders are not allowed).
ER_INVALID_FOLDER_NAME Invalid name.
ER_DUPLICATE_VAR_NAME Folder already exists.
ER_MEMORY Memory full.
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, cmd_delfold
Example:
This example creates a temporary folder name, which may already exist
and then creates a file in the folder, uses it, and then deletes the file.
EStackIndex oldTop;
FILES f1;
if (oldTop = TokenizeSymName((BYTE *) "ztemp1", 0)) {
TRY
cmd_newfold( top_estack ); /* create temporary folder */
ONERR
top_estack = oldTop;
/* Ignore error if duplicate name (folder already exists) */
if (errCode != ER_DUPLICATE_VAR_NAME)
PASS;
ENDTRY
top_estack = oldTop;
if (FS_OK == FOpen("FILE1", &f1, FM_WRITE, "DAT" )) {
/* . . . use file . . . */
FClose( &f1 );
}
FDelete( "FILE1" ); /* remove file */
}

Table of Contents

Other manuals for Texas Instruments TI-89

Related product manuals