Silverfrost Logo About Us | Contact Us
 

Text search

INTEGER FUNCTION FIND_EDIT_STRING@(E,STR,BACKWARDS,WHOLE_WORD, &
                            CASE_SENSITIVE,SELECT_RESULT)
INTEGER E(24)                      ! EDIT_INFO block
CHARACTER*(*) STR              ! String to seek
LOGICAL BACKWARDS             ! Set TRUE to perform backward search
LOGICAL WHOLE_WORD          ! Set TRUE to seek a whole word
LOGICAL CASE_SENSITIVE      ! Set TRUE when case must match
LOGICAL SELECT_RESULT       ! Set TRUE to leave result selected

This function searches for the specified string and returns 1 if successful and zero otherwise. Typically you would supply a search menu item on a window containing an edit box. In the call-back function associated with that menu you would display a dialog box to obtain the string (%rs) and some of the various flags (%rb) and then call find_edit_string@. Although designed for %eb, this function may also be useful when searching for a sub-string in a string obtained from some other source.

 

 

Copyright © 1999-2017 Silverfrost Limited