LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

match status help file

Hello all,
  I'm confused by the RegExpr_MatchText( ) function panel control help for the 'Match Status' parameter.  It reads to me as if the documentation is in error.  In the last paragraph below, shouldn't all references to -2 actually be -1, and references to -1 actually be 0?
 
Orlan
 
------------------------
Values:
1 matched
0 did not match
–1 did not match, and it was also determined that all attempts to find a match starting at subsequent bytes in the text will also fail.

The –2 return value is provided as an optimization. In some cases, the function can determine that it is useless to try to find a match anywhere in the text on or after the text address that was passed to the function. In that case, the function returns –2. If you are calling this function iteratively until you find a match, you can break out of your loop if the function returns –2. If you do not need to optimize, then you can treat –1 as the same.
0 Kudos
Message 1 of 3
(3,032 Views)

Hi Orlan,

I think you are exactly correct.  Thanks for bringing this to our attention!  I've filed a report on this to our documentation guys so they should be taking a look at it soon.  I"ll post again if I find out anything interesting.

Thanks again,
Megan B.
National Instruments

0 Kudos
Message 2 of 3
(3,009 Views)
Thanx Megan.  Smiley Very Happy
0 Kudos
Message 3 of 3
(2,997 Views)