Hi list,

below a extracted piece of program containing 2 times a "do rejoin".
I tried hard to not use rejoin, but compose instead, but it did'nt work out properly.
Could you show me how to rewrite the code in both cases?

Thanks in advance,
    Arie van Wingerden

http://home.zonnet.nl/rebolution

;;; ========================= Code follows here
REBOL []
;
; This function extends a 2nd level object with a function
;
add-affix-func: does [
 do rejoin [ "rules/" fxname ": "
  "make rules/" fxname " [ "    ; Extend 2nd level object
   "rule" fxcount ": func"      ; Function name
   "[ inword [ string! ] ]"     ; Function spec block
   "[ print 200 ]"
   "]"
  ]
]
;
; Main program starts here
;
fxname: "A"                     ; name of 2nd level object
fxcount: 1                      ; counter
rules:  make object! []         ; create 1st level object
do rejoin [ 
   "rules: make rules ["        ; create 2nd level object
    fxname ": make object! [ x: 100 ]]"
   ]
probe rules                     ; show intermediate result
input                           ; pause console
add-affix-func                  ; extend 2nd level object
probe rules                     ; show final result
input                           ; pause console

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to