Download Script Reference Manual

Transcript
statement
endif
OR
if expression then
statement
[[elseif expression then
statement ]...]
else
statement
endif
Examples
if NOT SelSchem() then
echo There are no schematics open
exit all
endif
if length(val)==1 then
echo {refs[idx]} {val}
else
echo Duplicate reference {refs[idx]}. Ignoring
endif
if opts[0] && opts[1] then
let sel = 1
elseif opts[0] then
let sel = 2
else
let sel = 3
endif
In form1, if the expression resolves to a TRUE value the statement will be executed. (TRUE
means not zero, FALSE means zero). In the second form the same happens but if the expression
is FALSE the statement after the else is executed. In the third form, if the first expression is
FALSE, the expression after the elseif is tested. If that expression is TRUE the next statement
is executed if not control continues to the next elseif or else.
While Statement
While statements are of the form:
do while expression
statement
loop
OR (alternative form)
while expression
statement
endwhile
16
SIMetrix/SIMPLIS Script Reference Manual