Hello [EMAIL PROTECTED]!

On 15-Giu-00, you wrote:

 G> I thought already about creating an object which has a layer
 G> like this:

 G> r: make object! [
 G> parm1: result
 G> xx: x parm1
 G> yy: y parm1
 G> zz: z parm 1
 G> aappend: func[ str] [append parm1 str]
 G> ]

 G> and then going like this
 G> r
 G> r/xx
 G> r/yy
 G> r/zz
 G> r/aappend "stuff"

 G> but then I thought that it's only slightly better, and still
 G> not ideal. what would be really cool is a way to bind x, y,
 G> and z so that I don't need any extra clutter, so my code would
 G> just be x
 G> y
 G> z
 G> append "stuff"

 G> and all these operations would happen on "result"

You mean something like:

r: make object! [
    result: system/words/result
    x: func [] [system/words/x result]
    y: func [] [system/words/y result]
    z: func [] [system/words/z result]
    append: func [str] [system/words/append result str]
]

do bind [
    x
    y
    z
    append "stuff"
] in r 'self

Regards,
    Gabriele.
-- 
Gabriele Santilli <[EMAIL PROTECTED]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/

Reply via email to