4.3BSD/usr/contrib/icon/man/man2/snapshot.2

.so tmac.ilib
.TH SNAPSHOT 2 "The University of Arizona \- 4/9/83"
.SH NAME
snapshot \- snapshot of state of string scanning
.SH DESCRIPTION
The procedure \*Msnapshot()\fR writes a snapshot of the state of string
scanning, showing the value of \*M&subject\fR and \*M&pos\fR. For
example,
.DS
"((a+b)\-delta)/(c*d))" ? (tab(bal('+\-/*')) & snapshot())
.DE
produces
.DS
.CS
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|                                   |
| &subject = "((a+b)\-delta)/(c*d))" |
|                          |        |
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
.CE
.DE
Note that the bar showing the \*M&pos\fR is positioned under the
\*M&pos\fRth character (actual positions are between characters).
If \*M&pos\fR is at the end of \*M&subject\fR, the bar is positioned
under the quotation mark delimiting the subject. For example,
.DS
"abcdefgh" ? (tab(0) & snapshot())
.DE
produces
.DS
.CS
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|                       |
| &subject = "abcdefgh" |
|                     | |
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
.CE
.DE
Escape sequences are handled properly. For example,
.DS
"abc\etdef\enghi" ? (tab(upto('\en')) & snapshot())
.DE
produces
.DS
.CS
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|                            |
| &subject = "abc\etdef\enghi" |
|                     |      |
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
.CE
.DE
.SH AUTHOR
Ralph E. Griswold