GOTO Equivalent in Rev?

Garrett Hylltun garrett at paraboliclogic.com
Wed Feb 15 14:10:13 EST 2006


On Feb 15, 2006, at 3:58 AM, David Burgun wrote:

> Hi,
>
> I don't understand why you would want to use GOTO anyway, but no I  
> don't think there is an equivalent in RunRev. Instead take a look  
> at defining a function or two. Functions are much more powerful,  
> less likely to cause problems and they make the code much easier to  
> read. Here is an example

Hi David,

Thank you, but a solution was already posted that more than did the  
job.  :-)

[Main Stack Handlers]

on SubCopy
   copy
end SubCopy

[ButtonCopy Handlers]

on mouseDown
   SubCopy
end mouseDown

This works great.  Of course the "copy" command is merely one simple  
word, but for larger routines, it's nice to me to be able to use only  
one piece of code instead of having to put the same exact code in  
several handlers through the program.  Whether it's done via a user  
function or as shown above, it's all the same to me.  I don't need to  
pass any parameters, so the above is good for me.

But I really do appreciate and thank you for dropping another  
solution to this one  :-)

Thanks,
-Garrett



More information about the use-livecode mailing list