AltME: Rebol School


Is this any help?
>> value? 'mycode
== false
>> mycode: []
== []
>> value? 'mycode
== true
Something like this, if I understood what you are trying to do properly:
>> if not value? to-word mycode [set to-word mycode [something]]
== [something]
>> CODE1
== [something]
That will create CODE1 in the global context though.
I have tried also:
value? get first [mycode]
Lets assume mycode is: CODE1
I whish to create a series whose name as I would write:
CODE1: copy []
I whish to create a series whose name is CODE1. Se the code should dinamically take it from MYCODE and execute a line like: CODE1: copy []
I don't know if it is the correct way:
mycode: "ONE"
do rejoin [get first [mycode] ":" " copy []"]
type? ONE
== block!
do reduce [to-set-word mycode copy []]
How do I check if ONE has been set to SERIES dynamically ?
type? reduce [mycode]
does not work
Here some code is making me crazy:
>> mycode: "ABC"
== "ABC"
>> do reduce [to-set-word mycode copy []]
== []
>> type? ABC
== block!
>> type? get first reduce [to-word codice-temp]
== block!
>> [type? get first reduce [to-word codice-temp]] <> block!
== true
The last one should be FALSE
[type? get first reduce [to-word codice-temp]]
should be:
(type? get first reduce [to-word codice-temp])
Now seems to be solved.
Following your code
codice-temp: "C001"
do reduce [to-set-word codice-temp copy []]
how do I check dynamically if the series C001 has been created ?
I have tried this
> type? get first [codice-temp]
== string!
But as you see it does not work
type?  get to-word codice-temp
better to use
do reduce [to-set-word codice-temp 'copy []] or you will
always produce two copies

Last message posted 190 weeks ago.