Correct, this is not possible. I've explored this topic in some depth
awhile ago, before the limit was raised. ANY word, whether global, local to
a context, an element to an object, a refinement, etc and irregardless of
value (even undefined words, if they are referenced even once) are put into
/system/words.
I have created a work-around, though it will not work if you are
dynamically generating words. I have written a pre-processor to a REBOL
script which will replace all function locally-declared words and function
parameter words with generic names (which get reused with each context).
The amount of word reduction depends on your coding style, and the tasks
you are doing. For the project I was working on, this helped alot.
- Michael Jelinek
Gisle Dankel <[EMAIL PROTECTED]>@rebol.com on 03/22/2001 07:56:19 AM
From: Gisle Dankel <[EMAIL PROTECTED]>@rebol.com on 03/22/2001 07:56 AM
Please respond to [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject: [REBOL] Re: Generating words and global variable space
Hi Doug,
I don't think this is the solution.
Let me illustrate the problem:
forever [to-word join 'x counter: counter + 1]
>> counter: 0
== 0
>> forever [to-word join 'x counter: counter + 1]
** Internal Error: No more global variable space
** Where: to-word
** Near: to word! :value
>> use [new-word] []
** Internal Error: No more global variable space
** Near: to word! :value
I need to generate lots of new words without filling up the global
variable space. It seems this is not possible.
Gisle
On Thu, 22 Mar 2001, Vos, Doug wrote:
> Is this what you are looking for?
> >> help use
> USAGE:
> USE words body
>
> DESCRIPTION:
> Defines words local to a block.
> USE is a native value.
>
> ARGUMENTS:
> words -- Local word(s) to the block (Type: block word)
> body -- Block to evaluate (Type: block)
> >>
>
> -----Original Message-----
> From: Gisle Dankel [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 22, 2001 8:02 AM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] Generating words and global variable space
>
>
>
> Hi list,
>
> do anyone know of a way to generate words without running out of global
> variable space?
> E.g. generating them in a local context?
>
> Gisle
>
>
>
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.