4.3BSD/usr/contrib/icon/test/std51.icn

record array(a,b,c,d,e,f,g)

procedure dummy(u,v,x,y,z)
   suspend u | v
   return x
end

procedure main()
   write("1 | 2 | 3 ----> ",image(1 | 2 | 3) | "none")
   write("|(1 to 10) ----> ",image(|(1 to 10)) | "none")
   write("||(1 to 10) ----> ",image(||(1 to 10)) | "none")
   write("|||(1 to 10) ----> ",image(|||(1 to 10)) | "none")
   write("||||(1 to 10) ----> ",image(||||(1 to 10)) | "none")
   write("|||||(1 to 10) ----> ",image(|||||(1 to 10)) | "none")
   write("|||||||(1 to 10) ----> ",image(|||||||(1 to 10)) | "none")
   write("2 \\ 2 ----> ",image(2 \ 2) | "none")
   write("while 1 do break ----> ",image(while 1 do break) | "none")
   write("while 1 do break \"hello\" ----> ",image(while 1 do break "hello") | "none")
   write("while break ----> ",image(while break) | "none")
   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")
   write("not 1 ----> ",image(not 1) | "none")
   write("not \\&null ----> ",image(not \&null) | "none")
   write("repeat break ----> ",image(repeat break) | "none")
   write("until 1 do 2 ----> ",image(until 1 do 2) | "none")
   write("if 1 then 2 else 3 ----> ",image(if 1 then 2 else 3) | "none")
   write("every write(if 1 then 1 to 10 else 5) ----> ",image(every write(if 1 then 1 to 10 else 5)) | "none")
   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")
   write("if 1 then 2 ----> ",image(if 1 then 2) | "none")
   write("if 1 = 0 then 2 ----> ",image(if 1 = 0 then 2) | "none")
   write("2 \\ \"a\" ----> ",image(2 \ "a") | "none")
end