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

procedure p1()
   write(" ----> ",image() | "none")
   write("every write((\"badc\" | \"edgf\" | \"x\") ? write(upto(!&lcase))) ----> ",image(every write(("badc" | "edgf" | "x") ? write(upto(!&lcase)))) | "none")
   write("every write(((\"aeiou\" | \"foobaz\") ? upto('dracula')) ? =(1 to 10)) ----> ",image(every write((("aeiou" | "foobaz") ? upto('dracula')) ? =(1 to 10))) | "none")
   write("every write((1 to 10) ? move(1)) ----> ",image(every write((1 to 10) ? move(1))) | "none")
   write("&subject := &pos ----> ",image(&subject := &pos) | "none")
   write("&pos :=: &subject ----> ",image(&pos :=: &subject) | "none")
   write("&pos ----> ",image(&pos) | "none")
   write("&subject ----> ",image(&subject) | "none")
   write("+1 ----> ",image(+1) | "none")
   write("-1 ----> ",image(-1) | "none")
end

procedure p2()
   write("?10 ----> ",image(?10) | "none")
   write("?10 ----> ",image(?10) | "none")
   write("?10 ----> ",image(?10) | "none")
   write("~&cset ----> ",image(~&cset) | "none")
   write("~&ascii ----> ",image(~&ascii) | "none")
   write("&subject := string(&lcase) ----> ",image(&subject := string(&lcase)) | "none")
   write("=\"a\" ----> ",image(="a") | "none")
   write("=\"b\" ----> ",image(="b") | "none")
   write("=\"d\" ----> ",image(="d") | "none")
   write("&subject := string(&lcase) ----> ",image(&subject := string(&lcase)) | "none")
end

procedure p3()
   write("while write(move(1)) ----> ",image(while write(move(1))) | "none")
   write("&subject := string(&lcase) ----> ",image(&subject := string(&lcase)) | "none")
   write("every write(tab(1 to 10)) ----> ",image(every write(tab(1 to 10))) | "none")
   write("pos(0) ----> ",image(pos(0)) | "none")
   write("pos(15) ----> ",image(pos(15)) | "none")
   write("&subject := string(&lcase) ----> ",image(&subject := string(&lcase)) | "none")
   write("pos(1) ----> ",image(pos(1)) | "none")
   write("every write(\"abcdef\" ? tab(1 to 10)) ----> ",image(every write("abcdef" ? tab(1 to 10))) | "none")
   write("every write(\"abcde\" ? while move(2) ? move(1)) ----> ",image(every write("abcde" ? while move(2) ? move(1))) | "none")
   write("s := \"abcdef\" ----> ",image(s := "abcdef") | "none")
   write("s ?:= move(3) ----> ",image(s ?:= move(3)) | "none")
end

procedure p4()
   write("s := \"abcdef\" ----> ",image(s := "abcdef") | "none")
   write("every write(s ?:= upto(&lcase)) ----> ",image(every write(s ?:= upto(&lcase))) | "none")
   write("s := \"this is the time to work it all out\" ----> ",image(s := "this is the time to work it all out") | "none")
   write("every write(s ? tab(find(\" \"))) ----> ",image(every write(s ? tab(find(" ")))) | "none")
   write("s := \"xxxxxx\" ----> ",image(s := "xxxxxx") | "none")
   write("every s ? write(=(\"a\" | \"x\")) ----> ",image(every s ? write(=("a" | "x"))) | "none")
   write("\"abcdef\" ? (tab(0) & (while write(move(-1)))) ----> ",image("abcdef" ? (tab(0) & (while write(move(-1))))) | "none")
end

procedure main()
   p1()
   p2()
   p3()
   p4()
end

