HomeManualTopicsTypesSymbols

std::on

if the specified condition is true then perform the specified action

Parameters

condition
true or false
action
an action to be performed when the condition is true

Results

None

Description

on is a conditional without an else-part. It is therefor performed only for the side-effects of the action.

Example

$x 5 on x > 3: println! "x is larger than 3"

Output

x is larger than 3

Topic

Branches

See also

std::on_no
std::if classic if; can be used as a function or a procedure
std::if_not can be used as a function or a procedure

Implemented by

std_types::false does not perform the specified action
std_types::true performs the specified action