TVPrint: PrintTV.TVPrintProc ~
TRUSTED {
cc: CHAR ← TextLooks.Look.FIRST;
true: TV ~ AMBridge.TVForReferent[NEW[BOOL←TRUE]];
false: TV ~ AMBridge.TVForReferent[NEW[BOOL←FALSE]];
IF AMBridge.IsRemote[tv] THEN RETURN [useOld: TRUE];
IF recursive THEN RETURN [useOld: TRUE];
recursive ← TRUE;
IO.PutRope[stream, "LOOKS["];
FOR c:
TV ← AMTypes.First[AMTypes.Domain[looksType]], AMTypes.Next[c]
UNTIL c =
NIL
DO
b: TV ← AMTypes.Apply[tv, c];
IF AMTypes.TVEqual[b, true] THEN IO.PutChar[stream, cc]
ELSE IF AMTypes.TVEqual[b, false] THEN NULL
ELSE ERROR;
IF cc # TextLooks.Look.LAST THEN cc ← cc.SUCC;
ENDLOOP;
IO.PutRope[stream, "]"];
recursive ← FALSE;
RETURN [useOld: FALSE];
};