AltME: Rebol School

Messages

PeterWood
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.
GiuseppeC
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 []
Sorry
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 []
GiuseppeC
I don't know if it is the correct way:
mycode: "ONE"
do rejoin [get first [mycode] ":" " copy []"]
type? ONE
== block!
sqlab
do reduce [to-set-word mycode copy []]
GiuseppeC
How do I check if ONE has been set to SERIES dynamically ?
type? reduce [mycode]
does not work
GiuseppeC
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
Ops,
[type? get first reduce [to-word codice-temp]]
should be:
(type? get first reduce [to-word codice-temp])
Now seems to be solved.
GiuseppeC
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
sqlab
type?  get to-word codice-temp
sqlab
better to use
do reduce [to-set-word codice-temp 'copy []] or you will
always produce two copies

Last message posted 157 weeks ago.