MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

re: fromliteral()



On Wed, 13 Mar 1996, Jefferson M. Dubrule wrote:

> --- Kipp the Kidd wrote:
> ;$no_one:eval_d("{1,2,3}")[2]
> => "{1,2,3}"
> --- end of quoted material ---
> actually, the fastest, and less DB assuming, way of doing this operation would
> be this:

  I believe he really meant to write:

  => {1, 2, 3}


> 
> ;eval("return "+toliteral({1,2,3}))
> => "{1, 2, 3}"


  This code will actually return a parse error, since there is no ';' at 
the end.  The proper code would be:

  ;eval("return" + toliteral({1, 2, 3}) + ";")[2]


	-Eric Derbyshire aka Fozzie (UMOO -- moo.cs.uwindsor.ca)





References:

Home | Subject Index | Thread Index