W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2002

F&O comments on insert function

From: Priscilla Walmsley <priscilla@walmsley.com>
Date: Wed, 20 Nov 2002 10:43:22 -0500 (EST)
To: <public-qt-comments@w3.org>
Message-ID: <003f01c290ab$86a78c90$339afea9@WALMSLEYPH>




The description of the insert function says: 

"The value returned by the function consists of all items of $target
whose index is less than or equal to N, followed by all items of
$inserts, followed by the remaining elements of $target, in that
sequence."

So, that would mean that 

insert( (1, 2, 3), 2, ("x", "y")) 

would return

(1, 2, "x", "y", 3)

That doesn't seem intuitive to me; I would expect it to be inserted one
position earlier:

(1, "x", "y", 2, 3)

Should the text say "less than N" instead of "less than or equal to N",
or was that deliberate?

Thanks,
Priscilla
Received on Wednesday, 20 November 2002 11:21:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:13:58 GMT