Page 1 of 1

Baffling error with setting a label

Posted: Tue Jun 17, 2008 10:14 am
by Andycal

Code: Select all

on mouseUp pMouseBtnNo
if the label of me is "Edit"
    set the label of me to "Generate"
end if 

end mouseUp
Surely that should work? Gives me a compile error every time.

Posted: Tue Jun 17, 2008 10:15 am
by Andycal
D'oh!

Code: Select all

then

Me too!

Posted: Wed Jun 18, 2008 6:00 am
by bjb007
Andycal

I forget "then" every time but the compiler
pops up a message to remind me.

I do think the "then" is a useless piece of baggage
and it shouldn't be too difficult to change Rev to
work without it. After all the line always starts
with "if" so ......

Posted: Wed Jun 18, 2008 8:01 am
by Mark
Hey Grumpy,

Every language needs some sort of "then". Sometimes it is ( and ) or { and }, sometimes it is ";". Be happy to have a readable "then" in xtalk languages.

Best,

Mark