Cmd_Newfold - Texas Instruments TI-89 Developer's Manual

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

Advertisement

1136

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
INVALID_PATHNAME_ERROR — Name contains another folder name
ER_INVALID_FOLDER_NAME
ER_DUPLICATE_VAR_NAME
ER_MEMORY
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" );
}
TI-89 / TI-92 Plus Developer Guide
Appendix A: System Routines — Variables
/* remove file */
Not for Distribution
— Reserved name.
(nested folders are not allowed).
— Invalid name.
— Folder already exists.
— Memory full.
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