Hello World
Print "Hello World!"
"Hello World!".print
JayMo-Edit
Command Line Interface (CLI)
Examples:
Random number:
Random.newInt( 1, 10 )
Dot before line, brackets & priorities:
(3 + ( 5 + 4 * 7 ) / 2 - 1).print
Classic notation:
Print 3 + ( 5 + 4 * 7 ) / 2 - 1
Chaining of functions:
[ 6, 9, 2, 8 ].sort.reverse.implode( '-' ).print
Changing and filtering lists:
[ 9, 7, 3, 8 ].map( each * 2 ).filter( each >= 10 ).print
Read file:
File( "demo.txt" ).lines.each.trim.caseDown.left( 3 ).print
Embed shell command:
"test.txt".´cat´?.trim.print
Graphic Swing-Application:
main = Swing_Main
button = Swing_Button( "Click me!" )
main.add( button )
main.setSize( 400, 300 ).setTitle( "Hello world" ).run