Hi Colin,
You almost had it. Look at this:
>> fred: make object! [f1: 1]
>> userdata: ask "Which object? "
Which object? fred
== "fred"
>> print mold to-word userdata
fred
>> print mold get to-word userdata
make object! [
f1: 1
]
>>
-Larry
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, November 25, 2001 4:02 PM
Subject: [REBOL] From string to object
> Hi all,
>
> I'm having a bit of trouble getting from a string to the
> contents of the object that the string names. I've tried
> an embarrassing combinations of 'set and 'load and
> wotnot, without finding the right magic.
>
> Can anyone help, please?
>
> An example to try to make sense of what I am asking ....
>
> =======
> fred: make object! [field1: 1 field2: 2]
> Doris: make object! [field1: 3 field2: 4]
>
> userdata: ask "Which object?"
> print mold :userdata
> =========
>
> What should the 'Print statement be to print object Fred if the user types
> "fred"?
>
> Thanks!
> Colin.
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.