Adding an entry to a vector or list
|
09-27-2023, 12:53 PM
Post: #10
|
|||
|
|||
RE: Adding an entry to a vector or list
(09-25-2023 11:22 PM)Albert Chan Wrote:(09-24-2023 04:13 PM)Tyann Wrote: You can also use list(-1):=expr, in which case expr will be added to the top of the list. I do not like this either. Using a negative number to indicate insertion rather than replacement is confusing and non-standard. In many languages, particularly Python (another Prime language option), a negative index indicates offset from the end of the list rather than the beginning. I can't see a reason for this odd notation as opposed to the more standard insert. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Adding an entry to a vector or list - krischik - 09-24-2023, 01:05 PM
RE: Adding an entry to a vector or list - Didier Lachieze - 09-24-2023, 01:21 PM
RE: Adding an entry to a vector or list - krischik - 09-24-2023, 01:36 PM
RE: Adding an entry to a vector or list - Tyann - 09-24-2023, 04:13 PM
RE: Adding an entry to a vector or list - krischik - 09-25-2023, 05:35 AM
RE: Adding an entry to a vector or list - Albert Chan - 09-25-2023, 11:22 PM
RE: Adding an entry to a vector or list - Tyann - 09-26-2023, 05:26 AM
RE: Adding an entry to a vector or list - jte - 09-26-2023, 07:15 AM
RE: Adding an entry to a vector or list - Tyann - 09-26-2023, 11:19 AM
RE: Adding an entry to a vector or list - John Keith - 09-27-2023 12:53 PM
|
User(s) browsing this thread: 6 Guest(s)