PrettyPrintDoc.tioga
Spreitzer, May 12, 1985 11:59:51 am PDT
PrettyPrint
CEDAR 6.0 — FOR INTERNAL XEROX USE ONLY
PrettyPrint
Mike Spreitzer
© Copyright 1985 Xerox Corporation. All rights reserved.
Abstract: PrettyPrint implements a command-tool command that evaluates an expression and prints the result prettily (formatting with whitespace).
Keywords: pretty, whitespace, format, print, evaluate, interpret, expression
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
1. PrettyPrint
PrettyPrint implements one command-tool command: PrettyPrint. Here it is:
name PrettyPrint:
syntax
"PrettyPrint" ("/" ["/"] <switch-letter> <value>)* <expression>
description
Evaluate the expression and prettily print (using whitespace) the result.
Possible switches are:
Verbosity: Boolean ← FALSE
Depth: INT ← 4
Controls how far the value is expanded.
maximum list Length: INT ← 32
Limits the number of list, array, or record elements printed for any given list, array, or record.
maximum line Width: INT ← 60
It will try to put no more than this many characters on each line.
If the slash introducing a switch is doubled, value sticks; otherwise, it doesn't.
examples
% PrettyPrint //l 5 ViewerOps.FindViewer["Watch"]
[class: [flavor: $Container, notify: NIL,
paint: ContainersImpl.ContainerPaint, modify: NIL,
destroy: NIL, ...], wx: 513, wy: 681, ww: 511,
wh: 109, ...]
stop/undo
Click the STOP! button.
implementation
PrettyPrint.Config in PrettyPrint.df
contact
Mike Spreitzer <Spreitzer.pa>