Here's a console session that proves args are treated as local to a
function:

>>
>> x: 5
== 5
>> dx: func [x][x: 10 print["xinternal = "x]]
>> dx x
xinternal =  10
>> x
== 5
>>
Voila'

Russell, [EMAIL PROTECTED]
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 25, 1999 7:48 AM
Subject: [REBOL] func question Re:


> --- [EMAIL PROTECTED] wrote:
> My question is, if I choose to use the words in block [ src text.align
> alt ] in any other function or anywhere else in the script, could there
> be a conflict in values?  Or do the values in a function remain
> entirely within the function?
> --- end of quote ---
> 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....
> ]
>
> --
> Andrew Grossman
> http://web.dartmouth.edu/~grossman/pgp.html
>

Reply via email to