> you have to give the variable an initial value, and also you will need to make
> it global.
> 
> global gIncre
> on mouseUp
> if gIncre=VOID then gIncre=0
> gIncre=gIncre+2
> put gIncre
> end

Actually, you don't have to give gIncre an initial value, though it's
probably good practice to do so. Lingo is fairly loosely scripted. Also,
there's another alternative - make gIncre a property. The choice between
property and global mainly depends on your goals and/or religion.

property pIncre

on mouseUp
  pIncre=pIncre+2
  put pIncre
end

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to