7if.txt
56 lines
| 919 B
| text/plain
|
TextLexer
/ examples / 7if.txt
r1 | ||||
# if-elseif | ||||
IF a=1: | ||||
!операторы | ||||
ELSEIF a=2: | ||||
!операторы | ||||
ELSEIF a=3: | ||||
!операторы | ||||
END | ||||
- | ||||
# if-iif | ||||
!Модуль числа | ||||
abs_x = IIF(x > 0, x, -x) | ||||
!А следующая конструкция вызовет ошибку деления на ноль: | ||||
x = 0 | ||||
y = IIF(x = 0, 0, 1/x) | ||||
- | ||||
# if-inline | ||||
if ((a+b)/c)=45+54 or (b<5 or c>45) and no obj 'лопата' and $f=$vvv+'RRRRR': p 'OK' & goto 'Next' | ||||
if был_здесь[$curloc]: exit | ||||
if a<3: jump 'sss' | ||||
if $имя = '': msg 'Введите имя!' & jump 'ввод' | ||||
if a+b=2:c=30 & gt 'next' else c=10 & d=11 | ||||
- | ||||
# if-lines | ||||
if a+b<3 or y=8: | ||||
p 'A+B<3 или Y=8' | ||||
nl | ||||
if j=88: nl & p 'NEXT' | ||||
if $h='ooo': | ||||
p 'loo' & jump 'lll' | ||||
end | ||||
end | ||||
if a=0: | ||||
'abc1234' | ||||
if b=0: '0' else '1' | ||||
if j=88:nl & p 'NEXT' | ||||
if $h='ooo': | ||||
p 'loo' & jump 'lll' | ||||
else | ||||
p 'sample text' | ||||
v=8 | ||||
end | ||||
'1234' | ||||
else | ||||
'01234' | ||||
g=78 | ||||
end | ||||
- | ||||