2010/7/28 Roger Hui <[email protected]>:
> Negative indexing and index origin 1 can co-exist.  e.g.
>
>   3 1 4 2 X 'abcd'
> cadb
>   _1 _2 _3 _4 X 'abcd'
> dcba

Indeed.  Older versions of perl have a feature where you can change
the index origin (for arrays and strings) to one -- this has been
depreciated in newer versions for a while now.  Perl also has negative
indexing.  And, indeed, this is how perl interprets negative indices
when index origin is one.

Ambrus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to