|
|
Initial revision
# This program takes Icon expressions as input and outputs an Icon
# program that tests the expressions, showing the expressions and
# the results of evaluating them.
procedure main()
local exp, lexp
write("record array(a,b,c,d,e,f,g)")
write("\nprocedure dummy(u,v,x,y,z)")
write(" suspend u | v")
write(" return x")
write("end")
write("\nprocedure main()")
while exp := read() do {
lexp := exp
lexp ?:= escape()
write(" write(\"",lexp," ----> \",image(",exp,") | \"none\")")
}
write("end")
end
procedure escape()
local line
line := ""
while line ||:= tab(upto('"\\')) || "\\" || move(1)
return line || tab(0)
end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.