Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

varlock

Locks a variable.

Syntax

  • varlock(scope, variable_name)

Input argument

  • scope - a string: 'global', 'base', 'caller', 'local'.
  • variable_name - a string: variable name.

Description

varlock locks a variable.

Locked variables cannot be killed.

ans variable cannot be locked.

Example

y = 3;
varislock('local', 'y')
varlock('local', 'y')
varislock('local', 'y')
y = 4
varunlock('local', 'y')
varislock('local', 'y')
y = 4
varlock('local', 'ans')
varislock('local', 'ans')

See also

varislock, varunlock.

History

VersionDescription
1.0.0initial version

Author

Allan CORNET