NAME
SetAtLimitIfAbove — If variable is above limit, set it at limit. Return value.
SYNOPSIS
SetAtLimitIfAbove VarName LimitValue
DESCRIPTION
Return Value
Current value of variable, whether or not it was changed.
Arguments
VarNameName of variable to check and set.
LimitValueValue to check against and set to, if above.
Error Conditions
ConditionError CodeError Message
Contents of variable are invalid. -11 Variable $VarName has invalid value $Value.
Input value is empty. -12 Variable $VarName has empty value.
Got empty string instead of variable name. -3 Variable name is missing. Got empty string.
More Info
If variable does not exist, it will be created and set to the limit value.
EXAMPLES
% set MyVar 1
1
% SetAtLimitIfAbove MyVar 0
0
% puts $MyVar
0
% set MyVar -1
-1
% SetAtLimitIfAbove MyVar 0
-1
% puts $MyVar
-1
SEE ALSO
SetAtLimitIfBelow
KEYWORDS
check, variable