Jump to content

Conditional structures: Difference between revisions

Line 3,779:
===if expressions===
If expressions are scoped per section.
<syntaxhighlight lang="langur">#if using.x the== fact0 that submatch() returns an empty array for no match ...{
# ... and that a decoupling assignment returns a Boolean...
 
if val .alias, .name = submatch($re/^(\.idregex;)\\s*;\\s*(\.idregex;)/, .row) {
# success (2 or more values in array returned from submatch function)
# use .alias and .name here
...
} else if .x > 0 {
Line 3,793 ⟶ 3,788:
...
}</syntaxhighlight>
 
Prior to langur 0.10, you would use parentheses around the declared variable names (.alias, .name).
 
===shortened form if expression===
890

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.