- 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
++ method
Literal strings are delimited by quotes, as usual:
var String name; name = "Isaac Newton";
The ++ method transforms two objects into strings and concatenates them. It is defined in a class that is the supertype of every other class, Any. Let’s see an example:
object Program public func run { var String name = “Isacc”; var String second = “Newton”; var String together; together = name ++ " " ++ second; // results in Isaac Newton } end