123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- this is still comment
- /*
- C style comments are also supported, and unlke C, they DO nest, but the
- comment indicator and the end of comment indicator must be the fist element
- on the line. Anything on the line of the end-of-comment indicator is also
- ignored
- /*
- so this is fine
- */ this is ignored too
- */
- 1
- 2
- 378
- +108
- -878
- 'a'
- "Hello world\"
- "
- `
- "Pop" goes the
- weasel's tail.
- `
- !true !false
- +0.5
- -7.000005
- [ foo "bar" ]
- [ 1 2 3 ]
- print "hello" world 7 0.9
- print ( mul 3 ( sum 5 7 ) )
- {
- print "hello"
- print "world"
- }
- 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
- }
- }
- set a 10
- print (get a 10)
- upset a 10
- =a 10
- print $a
- =foo a
- =$foo 20
- print $a
- if (less a 10) {
- print "Less"
- } else {
- print "More"
- }
- /*
- BLOCK
- PUSHS "More"
- CALL print
- PUSHBLOCK
- PUSHW else
- BLOCK
- PUSHS "Less"
- CALL print
- PUSHBLOCK
- PUSHI 10
- PUSHW a
- CALL less
- CALL if
- */
|