HTML Utilities

Showing help on 'listset()'

Syntax: listset (LIST <list>, <value>, INT <index>) => LIST

Returns a copy of <list> with the <index>th element replaced by <value>. If <index> is not in the range `[1..length(<list>)]', then E_RANGE is raised.

x = {"foo", "bar", "baz"};
listset(x, "mumble", 2) => {"foo", "mumble", "baz"}

This function exists primarly for historical reasons; it was used heavily before the server supported indexed assignments like x[i] = v. New code should always use indexed assignment instead of `listset()' wherever possible.



-- telnet://project-mongoose.net:7777 -- Mail us -- http://project-mongoose.net:7780/ --
-- Five users connected --