MOO-cows Mailing List Archive


re: fromliteral()

At 03:42 PM 3/13/96 PST, you wrote:
>>;$no_one:eval_d(toliteral(xxx))[2] == xxx
>I tried that and got this:
>=> "{1,2,3}"
>I tried that on a couple of other MOOs ranging from 1.7.9p2 to 1.8.0p1 and
>got the same thing. Apparently that eval just gives whatever you put in it,
>so you might as well just ;xxx. What he wanted was something like
>$string_utils:to_value, which was the opposite of toliteral(); you could put
>a string representing a value and get that value.

You gave toliteral a string, thus:

=> "\"{1}\""

and, as such:

=> "{1}"

It works as expected.  Watch your arguments to toliteral().


Home | Subject Index | Thread Index