TorqueScript Reference
Functions

Functions

void activatePackage (packageName)
 
void deactivatePackage (packageName)
 
Boolean isPackage (packageName)
 

Detailed Description

Function Documentation

◆ activatePackage()

void activatePackage ( packageName  )

Use the activatePackage function to activate a package definition and to re-define all functions named within this package with the definitions provided in the package body. This pushes the newly activated package onto the top of the package stack.

Parameters
packagenameThe name or ID of an existing package.
Returns
No return value.
See also
deactivatePackage, isPackage

◆ deactivatePackage()

void deactivatePackage ( packageName  )

Use the deactivatePackage function to deactivate a package definition and to pop any definitions from this package off the package stack. This also causes any subsequently stacked packages to be popped. i.e. If any packages were activated after the one specified in packageName, they too will be deactivated and popped.

Parameters
packagenameThe name or ID of an existing package.
Returns
No return value.
See also
activatePackage, isPackage

◆ isPackage()

Boolean isPackage ( packageName  )

Use the isPackage function to check if the name or ID specified in packageName is a valid package.

Parameters
packagenameThe name or ID of an existing package.
Returns
Returns true if packageName is a valid package, false otherwise.
See also
activatePackage, deactivatePackage