Find subarray in an array? [message #3608] |
Thu, 16 February 1995 09:16 |
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 |
+----------------------------------------------------------- -------------------+
|
|
|