Annotation of researchv10dc/cmd/icon/ipl/source/seqimage.icn, revision 1.1

1.1     ! root        1: #      SEQIMAGE
        !             2: #
        !             3: #      Image of result sequence
        !             4: #
        !             5: #      Ralph E. Griswold
        !             6: #
        !             7: #      Last modified 12/19/84
        !             8: #
        !             9: 
        !            10: procedure Seqimage(a)
        !            11:    local seq, result, i, j
        !            12:    seq := ""
        !            13:    i := @a[2]
        !            14:    j := @a[3]
        !            15:    while result := image(@a[1]) do
        !            16:       if *a[1] > \i then {
        !            17:          if /j then {
        !            18:             seq ||:= ", ..."
        !            19:             break
        !            20:             }
        !            21:          else {
        !            22:             resid := [", " || result]
        !            23:             every put(resid,", " || image(|@a[1]))
        !            24:             if *resid > j then seq ||:= ", ..."
        !            25:             every seq ||:= resid[*resid -j + 1 to *resid]
        !            26:             }
        !            27:          }
        !            28:       else seq ||:= ", " || result
        !            29:    return "{" || seq[3:0] || "}" | "{}"
        !            30: end

unix.superglobalmegacorp.com

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