|
|
Up |
|
|
  |
Author: Andrew HaleyAndrew Haley Date: Sep 9, 2008 03:12
Is it legal to use FIND on the name of a local variable to return xt
and then pass the xt to COMPILE, ? It doesn't seem to be forbiddedn
so I'm guessing this is OK.
Andrew.
|
| |
|
| | 4 Comments |
|
  |
Author: Jonah ThomasJonah Thomas Date: Sep 9, 2008 04:12
> Is it legal to use FIND on the name of a local variable to return xt
> and then pass the xt to COMPILE, ? It doesn't seem to be forbiddedn
> so I'm guessing this is OK.
No, it isn't OK.
13.3.3.2 Syntax restrictions
e) Words that return execution tokens, such as ' (tick), ['], or FIND,
shall not be used with local names;
|
| |
|
| | no comments |
|
  |
Author: Andrew HaleyAndrew Haley Date: Sep 9, 2008 06:19
Jonah Thomas gmail.com> wrote:
>> Is it legal to use FIND on the name of a local variable to return xt
>> and then pass the xt to COMPILE, ? It doesn't seem to be forbiddedn
>> so I'm guessing this is OK.
> No, it isn't OK.
> e) Words that return execution tokens, such as ' (tick), ['], or FIND,
> shall not be used with local names;
OK, thanks.
Andrew.
|
| |
| no comments |
|
  |
Author: Elizabeth D RatherElizabeth D Rather Date: Sep 9, 2008 10:12
Andrew Haley wrote:
> Is it legal to use FIND on the name of a local variable to return xt
> and then pass the xt to COMPILE, ? It doesn't seem to be forbiddedn
> so I'm guessing this is OK.
>
> Andrew.
>
Where would you do this? The local exists only within the scope of the
definition in which it's created, so you'd have to do whatever between a
] and [ and it all sounds very messy. Hard to imagine a context in
which this would be a good idea, which is probably why it isn't
explicitly forbidden. There's also, I suspect, no guarantee that it
would work.
Cheers,
Elizabeth
|
| Show full article (0.96Kb) |
| no comments |
|
  |
|
|
  |
Author: Andrew HaleyAndrew Haley Date: Sep 9, 2008 12:10
Elizabeth D Rather forth.com> wrote:
> Andrew Haley wrote:
>> Is it legal to use FIND on the name of a local variable to return xt
>> and then pass the xt to COMPILE, ? It doesn't seem to be forbiddedn
>> so I'm guessing this is OK.
> Where would you do this? The local exists only within the scope of the
> definition in which it's created, so you'd have to do whatever between a
> ] and [
Or an immediate word...
> and it all sounds very messy. Hard to imagine a context in which
> this would be a good idea,
Hah! I'll refer you to my not-yet-presented slides for EuroForth,
when all will become clear. :-)
Andrew.
|
| |
| no comments |
|
|