Hi Andrew,
you wrote:
>Rebol has made this exceedingly hard to do (oops, meant "easy"). Try
something like this to keep your vars local to your function.
>
>display|image: func [
>src
>text.align
>alt
>/local src text.align alt
>] [
>block of code....
>]
Once you declare an argument arg within a function's argument block:
f: func [arg] []
arg is local to f. You do not need to redeclare it local by using /local.
We set arg to a value:
>> arg: 1
== 1
We create a function, f, whose argument happens to also be called arg:
>> f: func [arg] [ print ["in f arg has the value" arg] ]
We call f with a different value. f's arg will be assigned this value:
>> f 3
in f arg has the value 3
But our global arg has retained its original value:
>> arg
== 1
Elan