next up previous contents
Next: Sorting Up: Sets, Lists, Arrays and Previous: Length of an Object

Operator

Calling Sequence:
op(obj)
op(i, eq)
Parameters:
obj : { string, set, list, array, matrix}
i : posint
eq : uneval

Returns: An expression sequence.

Synopsis: The op function strips off the outer-most square brackets [,] (list, array, matrix), outer-most braces {,} (set), or single quotes (') (string).

Examples:

> op([1, [a, b], 4]);
> op('hello there');
> op({1,2, {4, 5}, {7}});

When op is given two arguments, a posint i and an unevaluated expression eq, the function returns the ithoperand of eq.

Examples:

> z := noeval(var = integer);
> op(1, z); op(2, z);

See also: period operator (.)



Gaston Gonnet
1998-09-15