NAME
SetAtLimitIfBelow — If variable is below limit, set it at limit. Return value.
SYNOPSIS
SetAtLimitIfBelow VarName LimitValue
DESCRIPTION
Return Value
Current value of variable, even if it was not changed.
Arguments
VarNameName of variable to check and set.
LimitValueLimit value to check against and set to, if below.
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 the variable does not already exist, then it will be created and set to the limit value.
EXAMPLES
% set MyVar -1
-1
% SetAtLimitIfBelow MyVar 0
0
% puts $MyVar
0
% set MyVar 123
123
% SetAtLimitIfBelow MyVar 0
123
% puts $MyVar
123
SEE ALSO
SetAtLimitIfAbove
KEYWORDS
check, variable