Filter By Product

Can I use nested ‘if’ statements in LogicLoader?

Nested 'if' statements are supported in LogicLoader versions 2.3.0 and later. The following is an example of a nested 'if' statment in use:

losh> if (1)
echo "moose"
else
echo "dead"
endif
moose
losh> if (1)
echo "moose"
if (1)
echo "is loose"
else
echo "is a goose"
endif
else
echo "dead"
endif
moose
is loose
losh> if (1) echo "moose"
if (0) echo "is loose"
else echo "is a goose"
endif
else echo "dead"
endif
moose
is a goose
losh> if (0) echo "moose"
if (0) echo "is loose"
else echo "is a goose"
endif
else echo "dead"
endif
dead