RosettaCodeData/Task/Short-circuit-evaluation/NetRexx/short-circuit-evaluation.netrexx
2015-11-18 06:14:39 +00:00

29 lines
694 B
Text

/* NetRexx */
options replace format comments java crossref symbols nobinary
Parse Version v
Say 'Version='v
If a() | b() Then Say 'a and b are true'
If \a() | b() Then Say 'Surprise'
Else Say 'ok'
If a(), b() Then Say 'a is true'
If \a(), b() Then Say 'Surprise'
Else Say 'ok: \\a() is false'
Select
When \a(), b() Then Say 'Surprise'
Otherwise Say 'ok: \\a() is false (Select)'
End
Return
method a private static binary returns boolean
state = Boolean.TRUE.booleanValue()
Say '--a returns' state
Return state
method b private static binary returns boolean
state = Boolean.TRUE.booleanValue()
Say '--b returns' state
Return state