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




IMAGE(2)              Icon Program Library               IMAGE(2)



NNNNAAAAMMMMEEEE
     Image - generalized string image of Icon value

SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
     IIIImmmmaaaaggggeeee((((xxxx))))
     IIIImmmmaaaaggggeeeexxxx((((xxxx))))

DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
     The procedure IIIImmmmaaaaggggeeee((((xxxx)))) produces a string image of the value
     xxxx. The value produced is a generalization of the value pro-
     duced by the Icon function iiiimmmmaaaaggggeeee((((xxxx)))), providing detailed
     information about structures.

     Tags are used to uniquely identify structures. A tag con-
     sists of a letter identifying the type followed by an
     integer. The tag letters are LLLL for lists, RRRR for records, and
     TTTT for tables. The first time a structure is encountered, it
     is imaged as the tag followed by a colon, followed by a
     representation of the structure. If the same structure is
     encountered again, only the tag is given.

     An example is

          a := ["x"]
          push(a,a)
          t := table()
          push(a,t)
          t[a] := t
          t["x"] := []
          t[t] := a
          write(Image(t))

     which produces

          T1:["x"->L1:[],L2:[T1,L2,"x"]->T1,T1->L2]

     Note that a table is represented as a list of entry and
     assigned values separated by ---->>>>s.

     The procedure IIIImmmmaaaaggggeeeexxxx((((xxxx)))) is similar to IIIImmmmaaaaggggeeee((((xxxx)))), except that
     newlines and spaces are inserted to that the printed result
     is displayed on multiple lines with indentation. There are
     other formatting details that differ between the two pro-
     cedures.  For the example given above, the result of

          write(Imagex(t))

     is

          T1:{
             "x"
             ---



Version 5.9    The University of Arizona - 6/28/83              1






IMAGE(2)              Icon Program Library               IMAGE(2)



          L1:[]
             ]
          ------
          L2:[
             T1
             L2
             "x"
             ]
          ---
          T1
          ------
          T1
          ---
          L2
          ------
          ]


AAAAUUUUTTTTHHHHOOOORRRR
     Ralph E. Griswold



































Version 5.9    The University of Arizona - 6/28/83              2