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

Home » Public Forums » archive » Efficient pattern-matching in a large array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Efficient pattern-matching in a large array [message #77296 is a reply to message #77218] Wed, 17 August 2011 14:14 Go to previous messageGo to previous message
Bob[4] is currently offline  Bob[4]
Messages: 24
Registered: April 2009
Junior Member
This is nice but it would seem an incorrect use of keyword_set(w) in the while statement? If the where statement returns [0] (a possibly valid match) then the while statement will not run. Thus one of the standard approaches for detecting a successful where is needed (i.e., check that count gt 0 or pat[0] gt -1 w/o the /NULL).

ASIDE: IDL does not let you subscript a !null variable as a length one array.

IDL> a = !NULL
IDL> print, a[0]
% Variable is undefined: A.
% Execution halted at: $MAIN$

Why not? Seems to me it should print !NULL. This would be occasionally useful, although it would not help with the above problem.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: /RELAXED keyword not allowed?
Next Topic: Confession

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

Current Time: Sun Nov 30 13:43:11 PST 2025

Total time taken to generate the page: 1.36098 seconds