All help topics · Link to this topic
Showing help on 'toliteral()'
Syntax: toliteral (<value>) => STRReturns a string containing a MOO literal expression that, when evaluated, would be equal to <value>. If no arguments or more than one argument is given, E_ARGS is raised.
Examples:
toliteral(43) => "43"
toliteral(1.0/3.0) => "0.33333333333333"
toliteral(#17) => "#17"
toliteral(E_PERM) => "E_PERM"
toliteral({"A", "B", {"C", 123}}) => "{\"A\", \"B\", {\"C\", 123}}"