Thank you, Raul. I should have thought of that. Neat and clever.
Leigh
-----Original Message-----
From:
programming-bounces@...
[mailto:
programming-bounces@...] On Behalf Of Raul Miller
Sent: Friday, August 29, 2008 9:29 AM
To: Programming forum
Subject: Re: [Jprogramming] Negative Indices
On Fri, Aug 29, 2008 at 9:19 AM, Leigh J. Halliwell
<
leigh@...> wrote:
> I'm working with an array of n items. It's possible for my index to be
_1;
> but then I'd like _1 { array to generate an error, rather than to select
the
> last item. Is there any "clean/elegant" way to do this, i.e., with just
> using '{' and no conditional statements? I might have a similar problem
> with i. _1. Thanks.
You could use >.&_0.5 on your indices.
--
Raul
----------------------------------------------------------------------
For information about J forums see
http://www.jsoftware.com/forums.htm