Conditional structures: Difference between revisions

m
Line 2,917:
<lang Langur># using the fact that submatch() returns an empty array for no match and that a decoupling assignment returns a Boolean...
 
if varval (.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 {
varval .y = 100
...
} else {
varval .y = 70
...
}</lang>
890

edits