Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #3404
| From | 7stud -- <bbxx789_05ss@yahoo.com> |
|---|---|
| Newsgroups | comp.lang.ruby |
| Subject | Re: Array indexing |
| Date | 2011-04-23 12:02 -0500 |
| Organization | Service de news de lacave.net |
| Message-ID | <d8620da7d932531bdc3de6583e33ab79@ruby-forum.com> (permalink) |
| References | <alpine.DEB.2.00.1104231013590.6836@fryrpg-zna> |
Duke Normandin wrote in post #994657: > hey ... > > I want to make sure that I understand the subtle difference in the > syntax. > > my_array[0,3] > > and > > my_array[0..2] > > both will return the same array elements - correct? > If someone had a gun to your head and told you that you had 30 seconds to provide an answer to that question, what would you do? > the first _says_: "start at index0 & gimme 3" > the latter _say_: "start at index0 and goto index2" > Where is the ruby documentation located? > If the data requirements start at >index0, then there is no offset > between the "gimme" and the 'goto". > > Am I getting it? No. -- Posted via http://www.ruby-forum.com/.
Back to comp.lang.ruby | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Array indexing Duke Normandin <dukeofperl@ml1.net> - 2011-04-23 11:22 -0500
Re: Array indexing 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-23 12:02 -0500
Re: Array indexing Josh Cheek <josh.cheek@gmail.com> - 2011-04-23 12:37 -0500
Re: Array indexing Duke Normandin <dukeofperl@ml1.net> - 2011-04-23 13:12 -0500
csiph-web