The setFold() Command

setfold.png

Command Summary

A short description of what the command does.

Command Syntax

setFold(foldername)

Menu Location

This command can't be found in any menu besides the command catalog.

Calculator Compatibility

This command works on all calculators.

Token Size

X byte(s)

This command is used to set the current folder. The folder must exist, otherwise the function produces an error. This is a way around this error:

:example()
:Prgm
:Try
:setFold(fold1)
:Else
:ClrErr
:NewFold(fold1)
:EndTry

Advanced Uses

If you are changing the current folder, but want to set it back later, the getFold() command is not required to store the old folder name.
For example:

:foldset()
:Prgm
:Local a
:getFold()→a
:setFold(fold1)
    ...
:setFold(#a)
:EndPrgm

does the same thing as
:foldset2()
:Prgm
:Local a
:setFold(fold1)→a
    ...
:setFold(#a)
:EndPrgm

Error Conditions

420 - Invalid Folder Name happens when the folder does not exist.

Related Commands

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial 2.5 License.