SetFold

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-ShareAlike 3.0 License