GOTO Equivalent in Rev?

David Burgun dburgun at dsl.pipex.com
Wed Feb 15 06:58:16 EST 2006


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

function myCommonCode

-- do common code here

end myCommonCode


Then in the handlers where you want to perform the common code, do:

get myCommonCode()

You can also pass parameters to functions and have functions return a  
value, they work just like the functions built-in RunRev.


Hope this helps
Dave


On 14 Feb 2006, at 21:24, Garrett Hylltun wrote:

> Is there a goto equivalent in Rev?
>
> I have a popup menu, button bar and menu bar, all of which offer  
> the same functions, cut, copy, paste etc.  I don't want to have  
> separate code for each of the related handlers.  I want the copy  
> button, copy menu entry and copy popup menu entry to all use just  
> one handler (per say).
>
> Thanks,
> -Garrett
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list