form=input["Enter formatter", "Input"] // The noEval or $$ is necessary to prevent the internal string interpolations // from happening. // Think about how to prevent this more generally, like a non-interpolating // string. a = parseToExpression[""" if x < y ? true : false { c = 1000 println["This is a thing."] } else c = 100 if x < y c = 1000 else { println["This is a thing."] c = 100 } if x { if y c = 9 } else c = 4 if x { if y { c = 11 println["second"] } } else c = 7 i = 0 DOLOOP2: do { i = i + 1 println["hi"] if 2 > 3 break DOLOOP2 if 1 conforms 2 break; } while i 3 next OUTERFOR } for e = 1 to 2 println["Done. "] } MULTI1: multifor [a,b] = [new range[1,2], new range[3,4]] { println["$$a $$b"] if a > b next MULTI1 0 } try a = b finally { println[" in finally"] println[" wooo!"] } sqr = {|var x=10| x^2} double = {|x is isInteger = 10, dummy1=3| println[x] return 2x } e = getFunction["exp", 1] var f is [isPrime, isInteger] = 3 var o = new OrderedList[] o.insertAll[[5,2,1]] """] println[format[forloop,form]]