result = chop ( variable ) ;
list variable
- A list or str variable in which the lasted element is chopped.
list result
- element
When the chop function is used in an expression or an assignment, then the return value is the last element from the variable.
The STATUS variable is set to $ACKNOWLEDGE
- $ACKNOWLEDGE
When the chop function is used as an lvalue - as a statement - then the element chopped - if a variable - will create or overwrite the top-level variable of the same name. The return value is boolean 1, which is discarded on the stack.
The STATUS variable is set to $ACKNOWLEDGE
- %INVALID
Cannot create variable from parent variable
The STATUS variable is set to %INVALID
- %BOUNDS
No value to chop from variable
The STATUS variable is set to %BOUNDS
%INVALID : Cannot create variable from parent variable
%BOUNDS : No value to chop from variable
%ARGUMENT : Invalid arguments. Usage: result = chop ( variable ) ;
%IDENTIFIER : 'variable' argument is not a valid identifier, literal, or reference
%INVALID : 'argument' is not a list or str variable
None
None