I wrote "along the lines of" to leave to DVJ the work of taking care of the limit case where the searched for data is the very last or very first elements of the searched in data.

Alain Miville de Chêne wrote:
try something along the lines of:
========================
   dat=. 1 2 5 5 5 5 4 3 5 5 6
   5 5 E. dat
0 0 1 1 1 0 0 0 1 0 0

   0 1 0 E. 5 5 E. dat
0 0 0 0 0 0 0 1 0 0 0

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

Reply via email to