3.4.4. 복문 if~elseif~else~endif문
설명
문법
if <bool 표현식>
<명령문 A>
…
elseif <bool 표현식>
<명령문 B>
…
elseif <bool 표현식>
<명령문 C>
…
else
<명령문 N>
…
endif사용 예
Last updated
Was this helpful?
if <bool 표현식>
<명령문 A>
…
elseif <bool 표현식>
<명령문 B>
…
elseif <bool 표현식>
<명령문 C>
…
else
<명령문 N>
…
endifLast updated
Was this helpful?
Was this helpful?
var pressure=95, limit_h=90, limit_m=80
if pressure > limit_h
print "경고: 압력이 매우 높습니다."
elseif pressure > limit_m
print "알림: 압력이 높습니다.."
else
print "정상 동작 중."
endif
end