Jeez... you link a 7 year old blog post about Red compiler and ask if it's possible to create function's at runtime in compiled code - the answer is no, because that would require just-in-time compilation, and current compiler is ahead-of-time one. In general, current compiler cannot support dynamic code.
You can build functions at runtime in interpreter though, that's what func
, function
and other function constructors do all the time.
@rebolek
@9214 please...
:-))))
Vladimir can answer in any way he wants to me. I have started to get used and apreciate the good thing of him (talking personally)
@GiuseppeChillemi
Vladimir can answer in any way he wants to me.
Great :smile:
@9214
Well, I have tried the SET words-block values-block
solution with no success.
test: function
[
action
passed-args-block [block!]
]
[
args-def: [
add
[
the-path [string!]
key [word!]
value [any-type!]
]
del
[
the-path [string!]
key [string!]
]
]
function-words: extract select args-def action 2
set function-words passed-args-block
]
test 'add ["a-path" "a-key" "a-value"]
probe the-path
probe key
probe value
"a-path"
"a-key"
"a-value"
>>>
Words set into function
seems to exists after function exit: