Annotation of 43BSD/contrib/icon/book/16/lgraph.icn, revision 1.1

1.1     ! root        1: procedure lgraph(sgraph)
        !             2:    local nodes, ndescr, nlist, a, name, i
        !             3:    nodes := table()            # table of nodes
        !             4:    sgraph ?
        !             5:       while ndescr := tab(many(~';')) do {
        !             6:          move(1)
        !             7:          ndescr ? {            # process one node
        !             8:             a := []            # new list goes in table
        !             9:             nodes[tab(upto(':'))] := a
        !            10:             move(1)
        !            11:                                # add value and names
        !            12:             while put(a,tab(many(~','))) do
        !            13:                move(1)
        !            14:             }
        !            15:          }
        !            16:    every name := !nodes do     # change names to lists
        !            17:       every i := 2 to *name do
        !            18:          name[i] := nodes[name[i]]
        !            19:    return nodes
        !            20: end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.