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
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.
___
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
;
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
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
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
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?
> >
> >
>
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
- 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
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
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
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
12 matches
Mail list logo