## $FIND## 1995 Version of ANSI (Equivalent to Current ISO Version) of Standard |

$F[IND] ( __expr___{1} ,
__expr___{2} )

This form searches for the leftmost occurrence of the value of
__expr___{2} in the value of __expr___{1}.
If none is found, $Find returns zero. If one is found, the
value returned is the integer representing the number of the
character position immediately to the right of the rightmost
character of the found occurrence of __expr___{2} in
__expr___{1}. In particular, if the value of
__expr___{2} is empty, $Find returns 1.

$F[IND] ( __expr___{1} ,
__expr___{2} , __intexpr__ )

Let *a* be the value of __expr___{1}, let
*b* be the value of __expr___{2}, and let
*m* be the value of __intexpr__.
$Find(*a*,*b*,*m*) searches for the
leftmost occurrence of *b* in *a*, beginning the search
at the max(*m*,1) position of *a*. Let *p* be the
value of the result of
$Find($Extract(*a*,*m*,$Length(*a*)),*b*).
If no instance of *b* is found (i.e., *p*=0),
$Find returns the value 0; otherwise,
$Find(*a*,*b*,*m*) = *p* +
max(*m*,1) - 1.

Copyright © Standard Documents; 1977-2018 MUMPS Development Committee;

Copyright © Examples: 1995-2018 Ed de Moel;

Copyright © Annotations: 2003-2008 Jacquard Systems Research

Copyright © Annotations: 2008-2018 Ed de Moel.

This page most recently updated on 13-Sep-2014, 16:41:44 .

For comments, contact Ed de Moel (demoel@jacquardsystems.com)