# fromliteral()

Fozzie (derbysa@server.uwindsor.ca)
Thu, 14 Mar 1996 00:24:33 PST

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    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)