CASA Function: variableDifferentFrom
Return an unassigned variable that is different from the variables given as arguments.
Calling Sequence:
- v := variableDifferentFrom(excludedVariables)
Parameters:
- excludedVariables : list(anything)
- A list of names that will not be returned.
Result:
- v : name
- An unevaluated user variable, i.e., a global variable.
Description:
- The function returns a variable that is not among the given list of names. The function tries to take the first unevaluated variables from the list provided by the variable casaDefaultVariables. If it cannot find an appropriate variable, it takes the first of the variables x1, x2, etc. that has no value.
- The function is NOT intended to be used at the user level (though it would not do any harm), but instead serves as a subroutine to create new internal CASA variables.
Examples:
> casaDefaultVariables := [x,y,z,u];
> x:=0; x1:=1;
> excl := [y,u];
> excl := [op(excl),variableDifferentFrom(excl)];
> excl := [op(excl),variableDifferentFrom(excl)];
See Also:
[CASA]