r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Core] Discuss core issues

Steeve
9-Oct-2010
[18719]
so what ? you didn't declare 'crap in the context.
SET doesn't modify the context the words.
GrahamC
9-Oct-2010
[18720]
I'm saying that if you use the set method, then your words appear 
in the global context which you may not want
Steeve
9-Oct-2010
[18721x2]
So what ? you don't declare 'crap in the context.
I repeat: SET doesn't modify the context of the words.

Here  it's local.
>> c: context [crap: 0 set [crap] [1]] c/crape
== 1
Sorry for the echo, my connection is bad currenlty
GrahamC
9-Oct-2010
[18723]
It's Altme ....
Henrik
9-Oct-2010
[18724]
I think Graham simply wants the block to be set within the context 
with as little additional code as possible.
GrahamC
9-Oct-2010
[18725x2]
If you want to use the set method of whole sale settting variables 
you have to declare them first in the context to prevent them from 
becoming global.  So what gain is there?
unless you do something like this

use fields [
	set fields data
]
Ladislav
9-Oct-2010
[18727x2]
this creates globals though

 - this is actually wrong, SET does neither "create", nor "globals"
And in R3, it will bypass the setting of locals with funct

 - in R2, as well as in R3, when using the SET function, you bypass 
 the collection of object locals. In R3, with FUNCT, you may not bypass 
 the collection as follows:

set [a: b:] [1 2]
GrahamC
9-Oct-2010
[18729x2]
neat trick
because 'funct scans the body of the function looking for set-words
Ladislav
9-Oct-2010
[18731]
Actually, I already used the trick in R3
Steeve
9-Oct-2010
[18732x2]
with collect-words, an handy function, not well known
native by the way
Ladislav
9-Oct-2010
[18734]
COLLECT-WORDS is a native, but it is quite easy to define it in R2 
as a mezzanine
Steeve
9-Oct-2010
[18735:last]
but not soo fast indeed :-)