Rouge Documentation Help

Statements vs. expressions

Up to this point we have only worked with the console in Rouge Studio. You may be wondering why some lines you input will produce output, while others don't. For instance, the first line of this example program produces output, while the second line does not.

"hello" age = 12

Output:

hello

The console always generates output in case your input results in a value. Anything that evaluates to a value is called an expression. Examples of expressions are the creation of values, function calls, variables, or comparisons of values. On the other side, there are statements that we already introduced previously. Every line is a Rouge program is a statement, which represents a single instruction to the language. Unlike with an expression, a statement does not have to evaluate to a value. Expressions are a subset of statements, meaning that every expression is also a statement, but not every statement is an expression. The only example of a statement we have taken a look at so far is the assignment.

Last modified: 07 January 2026