On Tuesday 01 January 2013 20:02:15 Rick McGuire wrote: > On Tue, Jan 1, 2013 at 8:30 PM, Leslie Turriff <jlturr...@centurytel.net>wrote: > > I'm reading the Programming Guide, trying to get a grip on the > > allowed > > attributes for the indices of each type of collection. > > The Programming Guide says, "Each item stored in a > > Rexx collection has an associated index that you can use to retrieve the > > item > > from the collection with the AT or [] (left and right bracket) methods, > > and each collection deļ¬nes its own acceptable index types:". It goes on > > to describe the indexes for each collection type, but some of them are > > rather vague: > > "Array A sequenced collection of objects ordered by whole-number > > indexes." > > > > Okay, that's clear enough... > > > > "List A sequenced collection that lets you add new items > > at any position > > in the sequence. A list generates and returns an index value for each > > item placed in the list. The returned index remains valid until the item > > is removed from the list." > > > > Hmmm...so is a list index allowed to be an integer? A real number? > > Non-numeric? > > Help! > > > > > >From the documentation of the list class: > > The List creates a new index value whenever an item is added to the list > and the associated index value remains valid for that item regardless of > other additions or removals. Only > indexes the list object generates are valid i.e. the list is never a sparse > list and the list object will not > modify indexes for items in the list. > Draft > > Whenever an item is inserted into the list, an index is assigned to that > value. This index will remain valid for that item regardless of any other > insertions or deletions that may occur with the list. > > Rick > Okay, let's try this again.
Is a list index allowed to be an integer? A real number? Non-numeric? Leslie ------------------------------------------------------------------------------ Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep your Java skills current with LearnJavaNow - 200+ hours of step-by-step video tutorials by Java experts. SALE $49.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122612 _______________________________________________ Oorexx-users mailing list Oorexx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-users