RE: Negative-indexed arrays?

2002-12-23 Thread Lee Goddard
Lee Goddard Sent: Sun December 22 2002 18:15 To: $Bill Luebkert Cc: ActiveState's Perl Win32 Users list Subject: Re: Negative-indexed arrays? At 22:37 22/12/2002, $Bill Luebkert wrote: >Lee Goddard wrote: >>Perhaps my original question wasn't clear. >>I do not want $#_-10

RE: Negative-indexed arrays?

2002-12-23 Thread Lee Goddard
That's true: my Grandfather programmed it decades ago. So can Prolog. But is it relevant?! At 05:13 23/12/2002, Bill Royds -Perl wrote: Fortran can use any indices you want by declaring it as real foo(-10:10) and has been able to do that for years. ___

RE: Negative-indexed arrays?

2002-12-22 Thread Bill Royds -Perl
x27;s Perl Win32 Users list Subject: RE: Negative-indexed arrays? Usually, when $[ isn't 0, it is set to 1 for compatibility >with languages like fortrash that use 1 as the index of the first >element of an array. ___ Perl-Win32-Users mai

RE: Negative-indexed arrays?

2002-12-22 Thread Bill Royds -Perl
; return $indoff }; print $array[negind(-2, @array)]; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Lee Goddard Sent: Sun December 22 2002 18:15 To: $Bill Luebkert Cc: ActiveState's Perl Win32 Users list Subject: Re: Negative-indexed a

Negative Indexed Arrays

2002-12-22 Thread Carl Jolley
One approach to having a true-negative indexed array is by defining an object-oriented approach. A set of tied-array-based methods might provide the most natural approach. That should allow a transparent mapping of negative array indices onto a perl zero based array implementation while avoiding a

Re: RE: Negative-indexed arrays?

2002-12-22 Thread Lee Goddard
big pain when you could just use a hash. -Bill Cernansky - Original Message - From: Lee Goddard <[EMAIL PROTECTED]> Date: Sunday, December 22, 2002 6:09 am Subject: RE: Negative-indexed arrays? > Perhaps my original question wasn't clear. > I do not want $#_-10, I want litera

RE: Negative-indexed arrays?

2002-12-22 Thread Lee Goddard
Original Message- > >From: [EMAIL PROTECTED] > >[mailto:[EMAIL PROTECTED]]On Behalf Of Lee > >Goddard > >Sent: 22 Aralýk 2002 Pazar 15:19 > >To: Sisyphus; ActiveState's Perl Win32 Users list > >Subject: Re: Negative-indexed arrays? > > > > >

Re: Negative-indexed arrays?

2002-12-22 Thread Lee Goddard
At 22:37 22/12/2002, $Bill Luebkert wrote: Lee Goddard wrote: Perhaps my original question wasn't clear. I do not want $#_-10, I want literally $_[-10]. What's the difference which way it is if you access it only by using negative offsets ? Not *only* negative offsets. In other words: Does

Re: Negative-indexed arrays?

2002-12-22 Thread Sisyphus
- Original Message - From: "Lee Goddard" <[EMAIL PROTECTED]> To: "Sisyphus" <[EMAIL PROTECTED]>; "ActiveState's Perl Win32 Users list" <[EMAIL PROTECTED]> Sent: Monday, December 23, 2002 12:19 AM Subject: Re: Negative-in

RE: Negative-indexed arrays?

2002-12-22 Thread Carl Jolley
gt; >the array's size will be increased and ther will be no problem > > > >-Original Message- > >From: [EMAIL PROTECTED] > >[mailto:[EMAIL PROTECTED]]On Behalf Of Lee > >Goddard > >Sent: 22 Aralýk 2002 Pazar 15:19 > >To: S

Re: RE: Negative-indexed arrays?

2002-12-22 Thread Bill Cernansky
ke a big pain when you could just use a hash. -Bill Cernansky - Original Message - From: Lee Goddard <[EMAIL PROTECTED]> Date: Sunday, December 22, 2002 6:09 am Subject: RE: Negative-indexed arrays? > Perhaps my original question wasn't clear. > I do not want $#_-10

Re: Negative-indexed arrays?

2002-12-22 Thread $Bill Luebkert
Lee Goddard wrote: Perhaps my original question wasn't clear. I do not want $#_-10, I want literally $_[-10]. What's the difference which way it is if you access it only by using negative offsets ? In other words: Does anyone know if there is there a module that will allow me to have negative