> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 19, 2000 9:08 PM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] local vars - did I miss something?? Re:
Thanks to all for clarifying things up! My Rebol inbox is approaching
[EMAIL PROTECTED] wrote:
>
> test: func [input [block!]] [
> localvar: ""
> foreach item input [ localvar: append localvar to-string item ]
> return localvar
> ]
>
> test2: func [input [block!]] [
> localvar: make string! 0
> foreach item input [ localv
Hi Robert,
1. Your localvar, even though you call it localvar is a global word. To
make it a local word, either say:
test: func [input [block!] /local localvar] []
or
test: func [input [block!]] [
use [localvar] [
]
]
2. As a matter of principle it's not a good idea to use the word input