Texas Instruments TI89 Developer Guide - Page 1178
Er_invalid_folder_name, Er_duplicate_var_name
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 1178 highlights
1136 Appendix A: System Routines - Variables 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 */ } TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/1178.png)