Re: Syntax for OR
- Posted by DerekParnell (admin) Mar 04, 2015
- 1610 views
cp said...
It seems that this syntax is supported ?
if seqConn[1] = 1 or 3 then
and is equivalent to..
if seqConn[1] = 1 or seqConn[1] = 3 then
casey
As said by others, this type of shortcut is not supported. The operator precedence rules means that in the absence of parenthesis,
if seqConn[1] = 1 or 3 then
and is really equivalent to..
if (seqConn[1] = 1) or (3) then
or to use really longhand ...
if (seqConn[1] = 1) then ... elsif (3) then ... end if