Something went wrong. Try again.
The Mesa programming language
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179#> Hello, world!$print("Hello, world!")#> 5.23$print(5.23)#> true$print(true)#> [1, 7]$print([1, 7])#> {"id": 774}$print({"id": 774})#> nil$print(nil)#> a$print('a')#> é$print('é')
#> Multi-#> line$print("Multi-\nline")#> Tabu lated$print("Tabu\tlated")#> "Quoted"$print("\"Quoted\"")#> Back\slash$print("Back\\slash")#> #> $print('\n')#> $print('\t')#> \$print('\\')#> '$print('\'')#> "$print('"')
#> ["Multi-\nline", "Tabu\tlated", "\"Quoted\"", "Back\\slash"]$print(["Multi-\nline", "Tabu\tlated", "\"Quoted\"", "Back\\slash"])#> ['\n', '\t', '\\', '\'', '"']$print(['\n', '\t', '\\', '\'', '"'])
# A comment.#> nil$print(nil) # A trailing comment.
# Another comment with space.
# A # nested comment.
#---
y := [10, 20, 30]x := y[1]#> [10, 20, 30]$print(x)
#---
total := 1 + 2#> 3$print(total)
#---
def wrapped return 5.23end#> nil$print(wrapped)
#---
total := 1- 2#> 1$print(total)
#---
total := 1 + 2 * 4#> 9$print(total)
#---
s := "ab"y := s .size#> 2$print(y)
#---
ready := truecount := 5result := ready and count > 0#> true$print(result)
#---
def compute (1 + 2) * 3end#> 9$print(compute)
#---
def add(a, b) a + bend#> 7$print(add(3, 4))
#---
type Task(priority) def compute (1 + 2) * 3 endend#> 9$print(Task(1).compute)
#---
values := ( [ 1, # after # before 2, ])
# betweendef total # after values[0] + # between values[1]end # after
#> 3$print(total) # after
empty := [ # empty]#> []$print(empty)empty := { # empty}#> {}$print(empty)
#> # not a comment$print("# not a comment")#> #$print('#')
def sum(a, b) a + bend#> 7$print(sum( 3, # first # second 4))
# A comment at end of file.