ludus-scripts/start.ld

30 lines
1.2 KiB
Plaintext

& Welcome to Ludus!
& To run the code in this window, hit the RUN button.
& Ludus will evaluate this script and return its value.
& It will also perform "side effects": printing text to the screen,
& or making the "turtle" move (that's the little triangular guy).
& Lines that begin with an ampersand--&--are comments.
& Comments don't have any effect: they're for other people, not the machine.
& here's your usual first program:
print! ("Hello, world!")
& this is your first function call!
& notice a few things here:
& print! ("Hello, world!")
& ^^^^^^ This is the function name.
& Not `print` but `print!`
& ^^^^^^^^^^^^^^ This is what it prints.
& Note the quotation marks.
& Without them, Ludus would think this is code.
& ^ ^ Between parentheses!
& This is a "function argument."
& We need parens to send an arg to a function.
& Try printing other things--
& just delete the `&` at the start of these lines:
& print! ("Well, hello there!")
& print! ("Can", "we", "print", "multiple", "strings?")
& What do you notice?