Tags:
create new tag
view all tags

.TEXT FIND

This subroutine finds the position of text in a text/alpha field.


Usage:

      PASS         <text_position>            FIELD            SHARE? Y
      PASS         <text_field>               FIELD            SHARE? N
      PASS         <search_text>              FIELD            SHARE? N
      PASS         <start_of_text>            FIELD            SHARE? N
      PASS         <len_of _text>             FIELD            SHARE? Y
      PASS         <start_of_search>          FIELD            SHARE? N
      PASS         <len_of _search>           FIELD            SHARE? Y
      GOSUB    --- .TEXT FIND
      *        Check for errors
*     IF       --- .TEXT FIND                 NE

Description:

This subroutine finds the position of text in a text/alpha field. The first 3 parameters are required. If any required parameters are missing, the subroutine will CANCEL.

<text_position> returns the position of <search_text> within <text_field> (Required). This must be PASSed with Share "Y" to return the value.

<text_field> is the text to be searched (Required).

<search_text> is the text to be searched for (Required).

<start_of_text> is the starting position in <text_field> to begin the search (Optional). If not provided, <text_field> will be searched starting at position 1.

<len_of_text> is the number of characters from <start_of_text> to be searched (Optional). If not provided, <text_field> will be searched to the end of the field.

<start_of_search> is the starting position in <search_text> to use (Optional). If not provided, <search_text> starting at position 1 will be used.

<len_of_search> is the number of characters from <start_of_search> to be used (Optional). If not provided, <search_text> will be used to the end of the field.

Notes:

  • The <text_position> returned is always from the start of <text_field>, even if you only searched a substring of <text_field>.
  • This is a case sensitive search, regular expressions are not allowed.
  • This subroutine is designed to operate on Alpha, Text, and Token fields only. The returned results are undefined if you specify any other type of field.

Comments:

Read what other users have said about this page or add your own comments.


-- JeanNeron - 2012-02-09

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2023-04-10 - BrianRyan
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback