Version 0.60.0

reset

Resets a package to its initial state.

Signatures

  •   reset p

Details

The reset command is used to revert a package to its initial state, ensuring that any changes made to open or public parameters are discarded. This command is particularly useful when you need to reinitialize a package before executing it again, allowing for a fresh start with default parameter values.

When a package is reset, all open and public parameters are restored to their default values as defined in the package script. Any modifications made during previous executions are lost, and the package behaves as if it is being executed for the first time.

Example

 #import("mypackage.sps")
 mypackage::param = 10
 reset mypackage
 // The mypackage is now reset, and param is restored to its default value.
 

Note

Use the reset command when you need to ensure that a package is in its original state before re-execution. This can be useful in scenarios where parameter changes need to be discarded.

Parameters

p

The identifier of the package to be reset.

See also

🗙

Search results for