FindStringExact Method (DATALIST)


PLBCMP GUI Only

 

The FindStringExact method locates a string within a DATALIST or COMBOBOX object. The method uses the following format:

 

[label]

{object}.FindStringExact

[GIVING {return}] USING [*String=]{string}:

 

 

[*Index=]{index}

 

Where:

label

Optional. A Program Execution Label.

object

Required. A DATALIST or COMBOBOX object that is searched.

return

Optional. A Numeric Variable that returns the zero-based index the matching item in the list.

string

Required. A Character String Variable that specifies the exact string.

index

Required. A decimal number or Numeric Variable that indicates the item after which to start the search.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The search is not case sensitive.

  2. When the search reaches the bottom of the list, it continues from the top of the list back to the item specified by {index}.

  3. The currently selected item is not changed by this method.

  4. If the method is successful, the zero-based index of the matching item is returned. If the method is not successful, {return} will contain a -1.

  5. If the value returned is zero, the ZERO Condition Flag is set.

  6. If {return} is too small to contain the string index, the OVER Condition Flag is set.

  7. The EOS Condition Flag is always cleared.

 

 

See Also: Method Syntax, DATALIST Methods, COMBOBOX Methods

 



PL/B Language Reference FindString Method (COMBOBOX / DATALIST) GetCaretIndex Method (DATALIST)