- Installing
- Hello World
- Spaces
- Identation
- Basics
- Comments
- Output
- ++ method
- Assignments and types
- Operator Precedence
- String interpolation
- Input
- Simple arithmetic
- Multiline strings
- Assert
- Arrays and literal arrays
- Literal intervals
- If, for, while and repeat-until
- Message sends
- Conversion between basic type values
- Anonymous function
- Evaluating an anonymous function
- Functions with method foreach
- Prototypes
- Packages
- Gradual typing
- Generic prototypes
- Important metaobjects
- The CyanInterpreter prototype
Multi-line strings
A multi-line literal string starts and ends with triple quotes:
“”” multiple line
Strings are
allowed “”” println;
Strings are
allowed “”” println;
A special multi-line literal string starts with |”””, with the | character before the quotes. Both | and all characters before it in the current line are eliminated. Every | should be in a different line, although there may be empty lines between two lines. All | characters should be in the same column. All white spaces before the closing “”” are removed. The result is a multi-line string in which | delimited the start of each line.
var String s; s = |"""
|today |is the |day to be happy """;
Of course, variable interpolation with $ works with multi-line literal strings.