MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
re: fromliteral()
At 03:42 PM 3/13/96 PST, slayer@kaiwan.com wrote:
>At 07:10 AM 3/13/96 PST, ThwartedEfforts wrote:
>>At 12:11 AM 3/13/96 PST, you wrote:
>>>And finally, for completeness sake I suggest a tovalue() or fromliteral()
>>>builtin. If this is non-trivial I'm willing to wait for someone else to
>>>do this or perhaps attempt it myself, but if not I'd be nice to see it
>>>in 1.8.0.
>>
>>Dude, it's called eval(), and it works just fine:
>>
>>;$no_one:eval_d(toliteral(xxx))[2] == xxx
>>
>>Andy.
>>
>I tried that and got this:
>;$no_one:eval_d(toliteral("{1,2,3}"))[2]
>=> "{1,2,3}"
Um, not quite. Toliteral accepts a value, and returns a string. Replace
the whole `toliteral()' bit with the string you want converted to a list.
;$no_one:eval_d("{1,2,3}")[2]
=> "{1,2,3}"
- Kipp
-----BEGIN GEEK CODE BLOCK-----
GCS/CC d- s+:- a16 C++ UL++++ P+ L++ E-? W+ !N--@ !o-- K->K++++++
w++(--) O- M-- V--? PS++(+) PE(--) Y+ PGP-? t+ 5(+) X++ R+++(*)
!tv b+ DI++++ D++++ G e* h!()(*) r+ !y+
------END GEEK CODE BLOCK------
-----BEGIN NOT SO GEEKY BLOCK-----
MOO projects:
Breakthrough MOO project: paradigm.microwave.com 5000
MOO2000: moo.microwave.com 2000
MundoHispano: europa.syr.edu 8888
------END NOT SO GEEKY BLOCK------
Follow-Ups:
Home |
Subject Index |
Thread Index