Annotation of 43BSD/contrib/icon/book/17/swap.icn, revision 1.1

1.1     ! root        1: procedure swap(s)
        !             2:    static labels, trans, max
        !             3:    initial {
        !             4:       labels := "12"
        !             5:       trans := "21"
        !             6:       max := *labels
        !             7:       trans := swap(string(&cset))
        !             8:       labels := string(&cset)
        !             9:       max := *labels
        !            10:       }
        !            11:    if *s <= max then
        !            12:       return map(left(trans,*s),left(labels,*s),s)
        !            13:    else return swap(left(s,*s - max)) ||
        !            14:       map(trans,labels,right(s,max))
        !            15: end

unix.superglobalmegacorp.com

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