comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Find subarray in an array?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Find subarray in an array? [message #3608] Thu, 16 February 1995 09:16
kettmann is currently offline  kettmann
Messages: 1
Registered: February 1995
Junior Member
Hello folks,

I am looking for an efficient/elegant solution to find "sync words" within an
array.

The sync word consists of 3 consecutive bytes, for example:

SYNC = ['14'XB, '6f'XB, '2e'XB]

and I need to find the position of the first element of SYNC within an array
(it is not granted that there is any SYNC, it there could be more than one
SYNC).

I am aware of using a combination of the SHIFT and WHERE functions but I don't
feel particularly happy with that.

Any hints will be appreciated.

Georg.

+----------------------------------------------------------- -------------------+
| Georg Kettmann Phone: [+49] 55 56 - 979 345 |
| Max-Planck-Institut fuer Aeronomie FAX: - 240 |
| Postfach 20 Internet: kettmann@linrap.dnet.gwdg.de |
| D-37189 Katlenburg-Lindau, Germany SPAN: NSP::29050::KETTMANN |
+----------------------------------------------------------- -------------------+
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: device fonts
Next Topic: Turning function return into array & subscripting (Was: Re: rotating 3d array: help for the braindead!)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:53:24 PDT 2025

Total time taken to generate the page: 0.00574 seconds