From: "Robert M. Muench"
> Hi, can some help me with this:
> 
> list: [name string! birthday date!]
> 
> field: pick list 1
> type: pick list 2
> 
> >> type? Type
> == word!
> 
> What I want to do is to set field to a value of type 'type. Something
> like:
> 
> switch type [
> string! [value: "test"]
> ]
> to-set-word field reduce[make to-type type value]
> 
> Is something like this possible? Robert

Is this what you are looking for?


list: [name string! birthday date!]

foreach [field type] list [
    switch type [
        string! [value: "test"]
        date! [value: "1-1-1"]
    ]
    do reduce [to-set-word :field make do type value]
]

After execution, yielding:

>> name
== "test"
>> birthday
== 1-Jan-2001

Hope that helps.
--Scott Jones

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to