Annotation of 43BSD/contrib/icon/test/std51.icn, revision 1.1.1.1

1.1       root        1: record array(a,b,c,d,e,f,g)
                      2: 
                      3: procedure dummy(u,v,x,y,z)
                      4:    suspend u | v
                      5:    return x
                      6: end
                      7: 
                      8: procedure main()
                      9:    write("1 | 2 | 3 ----> ",image(1 | 2 | 3) | "none")
                     10:    write("|(1 to 10) ----> ",image(|(1 to 10)) | "none")
                     11:    write("||(1 to 10) ----> ",image(||(1 to 10)) | "none")
                     12:    write("|||(1 to 10) ----> ",image(|||(1 to 10)) | "none")
                     13:    write("||||(1 to 10) ----> ",image(||||(1 to 10)) | "none")
                     14:    write("|||||(1 to 10) ----> ",image(|||||(1 to 10)) | "none")
                     15:    write("|||||||(1 to 10) ----> ",image(|||||||(1 to 10)) | "none")
                     16:    write("2 \\ 2 ----> ",image(2 \ 2) | "none")
                     17:    write("while 1 do break ----> ",image(while 1 do break) | "none")
                     18:    write("while 1 do break \"hello\" ----> ",image(while 1 do break "hello") | "none")
                     19:    write("while break ----> ",image(while break) | "none")
                     20:    write("case 1 of {2:3; \"1\":4; 1: 4 to 10; default: \"whoa\"} ----> ",image(case 1 of {2:3; "1":4; 1: 4 to 10; default: "whoa"}) | "none")
                     21:    write("not 1 ----> ",image(not 1) | "none")
                     22:    write("not \\&null ----> ",image(not \&null) | "none")
                     23:    write("repeat break ----> ",image(repeat break) | "none")
                     24:    write("until 1 do 2 ----> ",image(until 1 do 2) | "none")
                     25:    write("if 1 then 2 else 3 ----> ",image(if 1 then 2 else 3) | "none")
                     26:    write("every write(if 1 then 1 to 10 else 5) ----> ",image(every write(if 1 then 1 to 10 else 5)) | "none")
                     27:    write("every write(if 1 = 0 then 1 to 10 else 10 to 1 by -1) ----> ",image(every write(if 1 = 0 then 1 to 10 else 10 to 1 by -1)) | "none")
                     28:    write("if 1 then 2 ----> ",image(if 1 then 2) | "none")
                     29:    write("if 1 = 0 then 2 ----> ",image(if 1 = 0 then 2) | "none")
                     30:    write("2 \\ \"a\" ----> ",image(2 \ "a") | "none")
                     31: end

unix.superglobalmegacorp.com

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