The Sol Programming Language!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
923 B

  1. Absolute Basics
  2. ===============
  3. This chapter is intended to give you just enough orientation of the Sol language to read the examples to follow.
  4. Sol has just one comment type, and it is a line comment; it is preceded by two dashes (--), and appears as follows::
  5. -- This is a comment
  6. --Whitespace to the right is recommended, but not required.
  7. -- Anything to the right of the dashes until the end of the line is completely ignored by the parser.
  8. Interactively, and in many examples, the `prepr` `function <functions>` is used to print convenient forms of the value or values given to it as parameters::
  9. prepr(1) -- Outputs "1" (without enclosing quotes) to stdout
  10. prepr(13.3) -- Outputs "13.3" to stdout"
  11. prepr("hi!") -- Outputs '"hi!"' (without enclosing single quotes) to stdout
  12. Alternatively, the `interpreter` will print the resulting value of any evaluation entered at its prompt.