BrightSign BrightScript 3.0 Reference Manual User Manual

Page 47

Advertising
background image

42

ElseIf BooleanExpression [ Then ]
[ Block ]

ElseStatement ::=
Else
[ Block ]


Example:
vp_msg_loop:
msg=wait(tiut, p)
if type(msg)="rovideoevent" then

if debug then print "video event";msg.getint()
if lm=0 and msg.getint() = meden then
if debug then print "videofinished"
retcode=5
return
endif
else if type(msg)="rogpiobutton" then
if debug then print "button press";msg
if esc0 and msg=b0 then retcode=1:return
if esc1 and msg=b1 then retcode=2:return
if esc2 and msg=b2 then retcode=3:return
if esc3 and msg=b3 then retcode=4:return
else if type(msg)=" Invalid" then
if debug then print "timeout"
retcode=6
return

Advertising