Programming language Chora: Statements

Chora provides a rich set of program statements, you use to formulate the desired logic of a regular method, slot method, onget method or onset method. Using the statements you can implement loops, conditions, declare local variables, and much more. Following statements are available:

Statement

Short description

var

Declare a local variable.

array

Declare a local array.

for

Iterate in a loop.

while

Iterate in a loop.

do ... while

Iterate in a loop.

break

Exit a for, while or do-while loop.

continue

Jump to the begin of a for, while or do-while loop.

if ... else

Control the program flow.

switch ... case

Control the program flow.

fallthrough

Fall through to the next clause in a switch statement.

return

End the method execution.

signal

Send a signal to a slot.

postsignal

Post a signal to a slot.

idlesignal

Post a signal to a slot.

throw

Raise an exception.

trace

Print debug output.

tracestack

Print debug output.

attachobserver

Register an observer.

detachobserver

De-register an observer.

notifyobservers

Notify registered observers.

native

Execute a native code block

{ ... }

Execute a block of statements.

;

Do nothing (empty statement).

expression

Evaluate an expression.