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




SNAPSHOT(2)           Icon Program Library            SNAPSHOT(2)



NNNNAAAAMMMMEEEE
     snapshot - snapshot of state of string scanning

DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
     The procedure ssssnnnnaaaappppsssshhhhooootttt(((()))) writes a snapshot of the state of
     string scanning, showing the value of &&&&ssssuuuubbbbjjjjeeeecccctttt and &&&&ppppoooossss. For
     example,

          "((a+b)-delta)/(c*d))" ? (tab(bal('+-/*')) & snapshot())

     produces

          -------------------------------------
          |                                   |
          | &subject = "((a+b)-delta)/(c*d))" |
          |                          |        |
          -------------------------------------

     Note that the bar showing the &&&&ppppoooossss is positioned under the
     &&&&ppppoooossssth character (actual positions are between characters).
     If &&&&ppppoooossss is at the end of &&&&ssssuuuubbbbjjjjeeeecccctttt, the bar is positioned
     under the quotation mark delimiting the subject. For exam-
     ple,

          "abcdefgh" ? (tab(0) & snapshot())

     produces

          -------------------------
          |                       |
          | &subject = "abcdefgh" |
          |                     | |
          -------------------------

     Escape sequences are handled properly. For example,

          "abc\tdef\nghi" ? (tab(upto('\n')) & snapshot())

     produces

          ------------------------------
          |                            |
          | &subject = "abc\tdef\nghi" |
          |                     |      |
          ------------------------------


AAAAUUUUTTTTHHHHOOOORRRR
     Ralph E. Griswold






Version 5.9    The University of Arizona - 4/9/83               1