previous  next
Tagged, Untagged, @
Syntax
Tagged(E:OBJECT,S:STRING):TAGGED(S)
Untagged(E:TAGGED_OBJECT):UNTAGGED_OBJECT
@E:TAGGED_OBJECT:UNTAGGED_OBJECT
Summary
tag or untag an object for pretty printing
Description
The first function returns the object E, tagged with the string S.
The second strips E of its tag, if any.  The "at sign" can also be
used to untag an object: @E is equivalent to Untagged(E).  These
functions are used for pretty printing of objects.  See the reference
listed below.

Example

L := [1,2,3];
M := Tagged(L,'MyTag');
Type(L);
LIST
-------------------------------
Type(M);
TAGGED("MyTag")
-------------------------------
Type(Untagged(M));
LIST
-------------------------------
Type(@M);
LIST
-------------------------------
See also: