- 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 functions
- Evaluating an anonymous function
- Functions with method foreach
- Prototypes
- Packages
- Gradual typing
- Generic prototypes
- Important metaobjects
- The CyanInterpreter prototype
Output
In the next example, we will see a use case of the package inOut, which is responsible for providing methods to capture input from the user from the default input, and also outputting values to the default output.
package program import inOut object Program public func run { var String name = “Newton”; Out println: name; } end
In a similar way, we can use
Out print: name;
to avoid going to the next line. If you’re familiar with Java, it is basically the same.