123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- but the {} pairs must match.
- }
- p 1
- p 2
- p 378
- p +108
- p -878
- p "Hello world\"
- "
- p `
- "Pop" goes the
- weasel's tail.
- `
- p !true !false !nil
- p +0.5
- p -7.000005
- p [ foo "bar" ]
- p [ 1 2 3 ]
- print "hello" world 7 0.9
- print ( mul 3 ( sum 5 7 ) )
- command {
- print "first block"
- } and also {
- print "second block"
- }
- type Door ( object locked Bool keys Item[] )
- to open[door Door key Item] Bool {
- if (contains (member door key) key) {
- set (member door open) true
- }
- }
- cover open open[door Door key Item]
- set a 10
- print (get a 10)
- upset a 10
- =a 10
- print $a
- =indirect a
- = ($indirect) 20
- =$indirect 20
- print $a
- print $$indirect
- if (less a 10) {
- print "Less"
- } else {
- print "More"
- }
- 5
- =foo ( sqrt 2.0 + 3.14 - 2.1 )
- $foo
- BLOCK
- PUSHS "More"
- CALL print
- PUSHBLOCK
- PUSHW else
- BLOCK
- PUSHS "Less"
- CALL print
- PUSHBLOCK
- PUSHI 10
- PUSHW a
- CALL less
- CALL if
- }
|