Variable Scoping

Martin Blackman martinblackman at gmail.com
Mon Oct 9 23:44:06 CDT 2006


There is a property the variablenames I think (not in front of Rev at
moment) . You could put the names and their values into a global
variable before calling a function and get at them that way using a
looped do statement in your function. This may add too much overhead
though.

I came up against a similar problem recently. My app allows the user
to write macros which are then 'done' by the rev engine, I have no way
of knowing the user's var names in advance but need to refer to them.
So I avoided use of subroutines for the macro execution code and went
for one long handler.  Of course you don't have that option..


On 10/10/06, Mark Wieder <mwieder at ahsoftware.net> wrote:
> Luis-
>
> Monday, October 9, 2006, 3:41:10 PM, you wrote:
>
> > What a are the performance hits with the different methodologies?
>
> Good question. I should really wait for Richard Gaskin to chime in
> here, since he's usually the one with the benchmarks, but I'dd dive in
> anyway. Off the top of my head I wouldn't expect to find any
> significant differences. Rev does almost everything in memory, so the
> differences you'd find would probably have to do with levels of
> indirection and shouldn't make a difference unless you're nesting
> repeat loops and/or doing very time-critical applications.
>
> --
> -Mark Wieder
>  mwieder at ahsoftware.net
>
> _______________________________________________
> 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