PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Various
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Seeks the subscript of an element in a WLanguage array. The following searches can be performed:
  • Seek an element in a one-dimensional array of simple elements.
  • Seek an element in a two-dimensional array of simple elements according to a column.
  • Seek an element in a two-dimensional array of simple elements according to several columns.
  • Seek an element in a one-dimensional array of structures or classes.
  • Versions 22 and later
    WINDEVWEBDEV - Server codeWindows Mobile Seek an element in an array of records.
    New in version 22
    WINDEVWEBDEV - Server codeWindows Mobile Seek an element in an array of records.
    WINDEVWEBDEV - Server codeWindows Mobile Seek an element in an array of records.
  • Seek an object in an array.
Notes:
  • This function is equivalent to Seek.
  • PHP In PHP, the search cannot be performed in an array containing more than one dimension or in an array of structures.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 16 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WEBDEV - Browser code This function is now available in browser code.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WEBDEV - Browser code This function is now available in browser code.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WEBDEV - Browser code This function is now available in browser code.
Example
arrMyArray is array of 0 string
// Fill the array
ArrayAdd(arrMyArray, "WINDEV")
ArrayAdd(arrMyArray, "WEBDEV")
ArrayAdd(arrMyArray, "WINDEV and WEBDEV")
// Find "WINDEV"
ResSubscript is int
ResSubscript = ArraySeek(arrMyArray, asLinearFirst, "WINDEV")
Info("The WINDEV string is found at subscript: " + ResSubscript)
// Returns: "The WINDEV string is found at subscript: 1"
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)
arrCalendar is array of gglCalendars
// Find a calendar identified by its title
ArraySeek(arrCalendar, asLinear, "title", "Professional calendar")
Syntax

Seeking an element in a one-dimensional array of simple elements Hide the details

<Result> = ArraySeek(<Array Name> , <Type of Search> , <Sought Value> [, <Start Subscript>])
<Result>: Integer
  • Subscript of sought element,
  • -1 if the element is not found in the array.
<Array Name>: Array
Name of Array variable to use. This array must be a one-dimensional array.
This array can also correspond to a one-dimensional array associated with a property of advanced variable.
<Type of Search>: Integer constant
Type of search to perform:
asBinaryBinary search.
This search mode is fast but it must be used on an array sorted in ascending order, without duplicates, and by using exactly the same search options as the ones used for the sort (see ArraySort).
asLinearLinear search. The search starts:
  • from the first element
  • from <Start Subscript>
The search stops as soon as an element is found.
asLinearLastLinear search from the last element. This constant must not be used if <Start Subscript> is specified.
asLinearPreviousLinear search for the previous element. This search is performed from the current position or from <Start Subscript>.
asLinearFirstLinear search from the first element. <Start Subscript> is ignored when this constant is specified.
asLinearNextLinear search for the next element. This search is performed from the current position or from <Start Subscript>.
Versions 17 and later
The type of search can be combined with one or more search options:
tccLexicographicOrderArray sorted according to the linguistic order.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccRespectNumericArray sorted according to the order of numeric values.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreAccentSearch while ignoring the accented characters.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreCaseSearch while ignoring the case.
This option can only be used on the arrays of character strings.
tccIgnoreSpaceSearch while ignoring the space characters found at the beginning and at the end of strings.
This option can only be used on the arrays of character strings.
Versions 20 and later
tccIgnoreInsideSpace
New in version 20
tccIgnoreInsideSpace
tccIgnoreInsideSpace
Search while ignoring the space characters found inside the strings.
This option can only be used on the arrays of character strings.
tccIgnorePonctuationAndSpaceSearch while ignoring the space characters and the punctuation characters.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
AndroidAndroid Widget JavaPHP The constants used to define the search options are not available.
New in version 17
The type of search can be combined with one or more search options:
tccLexicographicOrderArray sorted according to the linguistic order.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccRespectNumericArray sorted according to the order of numeric values.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreAccentSearch while ignoring the accented characters.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreCaseSearch while ignoring the case.
This option can only be used on the arrays of character strings.
tccIgnoreSpaceSearch while ignoring the space characters found at the beginning and at the end of strings.
This option can only be used on the arrays of character strings.
Versions 20 and later
tccIgnoreInsideSpace
New in version 20
tccIgnoreInsideSpace
tccIgnoreInsideSpace
Search while ignoring the space characters found inside the strings.
This option can only be used on the arrays of character strings.
tccIgnorePonctuationAndSpaceSearch while ignoring the space characters and the punctuation characters.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
AndroidAndroid Widget JavaPHP The constants used to define the search options are not available.
The type of search can be combined with one or more search options:
tccLexicographicOrderArray sorted according to the linguistic order.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccRespectNumericArray sorted according to the order of numeric values.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreAccentSearch while ignoring the accented characters.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreCaseSearch while ignoring the case.
This option can only be used on the arrays of character strings.
tccIgnoreSpaceSearch while ignoring the space characters found at the beginning and at the end of strings.
This option can only be used on the arrays of character strings.
Versions 20 and later
tccIgnoreInsideSpace
New in version 20
tccIgnoreInsideSpace
tccIgnoreInsideSpace
Search while ignoring the space characters found inside the strings.
This option can only be used on the arrays of character strings.
tccIgnorePonctuationAndSpaceSearch while ignoring the space characters and the punctuation characters.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
AndroidAndroid Widget JavaPHP The constants used to define the search options are not available.
For a dichotomous search, the search options must be exactly the same as the options that were used to sort the array (see ArraySort).
<Sought Value>: Any type
Value of element whose subscript is requested.
<Start Subscript>: Optional integer
Start position for the search (linear search only). This parameter is not required for a binary search.
PHP Syntax not available in PHP

Seeking an element in a two-dimensional array of simple elements according to a column Hide the details

<Result> = ArraySeek(<Array Name> , <Type of Search> , <Column> , <Sought Value> [, <Start Subscript>])
<Result>: Integer
  • Subscript of sought element,
  • -1 if the element is not found in the array.
<Array Name>: Array
Name of Array variable to use. This array must be a two-dimensional array.
This array can also correspond to a two-dimensional array associated with a property of advanced variable (sorting an xlsDocument variable according to the values of a column for example).
<Type of Search>: Integer constant
Search to perform:
asBinaryBinary search.
This search mode is fast but it must be used on an array sorted in ascending order, without duplicates, and by using exactly the same search options as the ones used for the sort (ArraySort).
asLinearLinear search. The search starts:
  • from the first element
  • from <Start Subscript>
The search stops as soon as an element is found.
asLinearLastLinear search from the last element. This constant must not be used if <Start Subscript> is specified.
asLinearPreviousLinear search for the previous element. This search is performed from the current position or from <Start Subscript>.
asLinearFirstLinear search from the first element. This constant must not be used if <Start Subscript> is specified.
asLinearNextLinear search for the next element. This search is performed from the current position or from <Start Subscript>.
Versions 17 and later
The type of search can be combined with one or more search options:
tccLexicographicOrderArray sorted according to the linguistic order.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccRespectNumericArray sorted according to the order of numeric values.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreAccentSearch while ignoring the accented characters.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreCaseSearch while ignoring the case.
This option can only be used on the arrays of character strings.
tccIgnoreSpaceSearch while ignoring the space characters found at the beginning and at the end of strings.
This option can only be used on the arrays of character strings.
Versions 20 and later
tccIgnoreInsideSpace
New in version 20
tccIgnoreInsideSpace
tccIgnoreInsideSpace
Search while ignoring the space characters found inside the strings.
This option can only be used on the arrays of character strings.
tccIgnorePonctuationAndSpaceSearch while ignoring the space characters and the punctuation characters.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
AndroidAndroid Widget Java The constants used to define the search options are not available.
New in version 17
The type of search can be combined with one or more search options:
tccLexicographicOrderArray sorted according to the linguistic order.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccRespectNumericArray sorted according to the order of numeric values.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreAccentSearch while ignoring the accented characters.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreCaseSearch while ignoring the case.
This option can only be used on the arrays of character strings.
tccIgnoreSpaceSearch while ignoring the space characters found at the beginning and at the end of strings.
This option can only be used on the arrays of character strings.
Versions 20 and later
tccIgnoreInsideSpace
New in version 20
tccIgnoreInsideSpace
tccIgnoreInsideSpace
Search while ignoring the space characters found inside the strings.
This option can only be used on the arrays of character strings.
tccIgnorePonctuationAndSpaceSearch while ignoring the space characters and the punctuation characters.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
AndroidAndroid Widget Java The constants used to define the search options are not available.
The type of search can be combined with one or more search options:
tccLexicographicOrderArray sorted according to the linguistic order.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccRespectNumericArray sorted according to the order of numeric values.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreAccentSearch while ignoring the accented characters.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreCaseSearch while ignoring the case.
This option can only be used on the arrays of character strings.
tccIgnoreSpaceSearch while ignoring the space characters found at the beginning and at the end of strings.
This option can only be used on the arrays of character strings.
Versions 20 and later
tccIgnoreInsideSpace
New in version 20
tccIgnoreInsideSpace
tccIgnoreInsideSpace
Search while ignoring the space characters found inside the strings.
This option can only be used on the arrays of character strings.
tccIgnorePonctuationAndSpaceSearch while ignoring the space characters and the punctuation characters.
This option can only be used on the arrays of character strings.
WEBDEV - Browser code This constant is not available.
AndroidAndroid Widget Java The constants used to define the search options are not available.
For a dichotomous search, the search options must be exactly the same as the options that were used to sort the array (see ArraySort).
<Column>: Integer or character string
Simple array: Subscript of column where the search will be performed.
Advanced array: Property for which the search must be performed. You also have the ability to use chained properties ("Border.Color" for example).
<Sought Value>: Any type
Value of element whose subscript or property is requested.
<Start Subscript>: Optional integer
Start position for the search (linear search only). This parameter is not required for a binary search.
PHP Syntax not available in PHP

Seeking an element in a two-dimensional array of simple elements according to several columns Hide the details

<Result> = ArraySeek(<Array Name> , <Type of Search> , <Columns>, <Sought Value 1 > [, <Sought Value 2> [ ... [, <Sought Value N>]]] [, <Start Subscript>])
<Result>: Integer
  • Subscript of sought element,
  • -1 if the element is not found in the array.
<Array Name>: Array
Name of Array variable to use. This array must be a two-dimensional array. This array can also correspond to a two-dimensional array of advanced type (sort performed on an xlsDocument variable according to the values of one or more columns for example).
<Type of Search>: Integer constant
Search to perform. No binary search is available.
asLinearLinear search. The search starts:
  • from the first element:
  • from <Start Subscript>
The search stops as soon as an element is found.
asLinearLastLinear search from the last element. This constant must not be used if <Start Subscript> is specified.
asLinearPreviousLinear search for the previous element. This search is performed from the current position or from <Start Subscript>.
asLinearFirstLinear search from the first element. This constant must not be used if <Start Subscript> is specified.
asLinearNextLinear search for the next element. This search is performed from the current position or from <Start Subscript>.
Versions 17 and later
The type of search can be combined with one or more search options:
tccLexicographicOrderArray sorted according to the linguistic order.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccRespectNumericArray sorted according to the order of numeric values.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreAccentSearch while ignoring the accented characters.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreCaseSearch while ignoring the case.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
tccIgnoreSpaceSearch while ignoring the space characters found at the beginning and at the end of strings.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
Versions 20 and later
tccIgnoreInsideSpace
New in version 20
tccIgnoreInsideSpace
tccIgnoreInsideSpace
Search while ignoring the space characters found inside the strings.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
tccIgnorePonctuationAndSpaceSearch while ignoring the space characters and the punctuation characters.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
WEBDEV - Browser code This constant is not available.
AndroidAndroid Widget Java The constants used to define the search options are not available.
New in version 17
The type of search can be combined with one or more search options:
tccLexicographicOrderArray sorted according to the linguistic order.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccRespectNumericArray sorted according to the order of numeric values.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreAccentSearch while ignoring the accented characters.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreCaseSearch while ignoring the case.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
tccIgnoreSpaceSearch while ignoring the space characters found at the beginning and at the end of strings.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
Versions 20 and later
tccIgnoreInsideSpace
New in version 20
tccIgnoreInsideSpace
tccIgnoreInsideSpace
Search while ignoring the space characters found inside the strings.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
tccIgnorePonctuationAndSpaceSearch while ignoring the space characters and the punctuation characters.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
WEBDEV - Browser code This constant is not available.
AndroidAndroid Widget Java The constants used to define the search options are not available.
The type of search can be combined with one or more search options:
tccLexicographicOrderArray sorted according to the linguistic order.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccRespectNumericArray sorted according to the order of numeric values.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreAccentSearch while ignoring the accented characters.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
WEBDEV - Browser code This constant is not available.
tccIgnoreCaseSearch while ignoring the case.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
tccIgnoreSpaceSearch while ignoring the space characters found at the beginning and at the end of strings.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
Versions 20 and later
tccIgnoreInsideSpace
New in version 20
tccIgnoreInsideSpace
tccIgnoreInsideSpace
Search while ignoring the space characters found inside the strings.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
tccIgnorePonctuationAndSpaceSearch while ignoring the space characters and the punctuation characters.
This option is applied to all columns on which the search is performed.
This option is useful for the arrays of character strings.
WEBDEV - Browser code This constant is not available.
AndroidAndroid Widget Java The constants used to define the search options are not available.
For a dichotomous search, the search options must be exactly the same as the options that were used to sort the array (see ArraySort).
<Columns>: Character string (with quotes)
Simple array: List of columns where the search must be performed. The different columns must be separated by a semicolon. Example: "2;3" to perform a search on the columns 2 and 3.
Advanced array: List of properties where the search must be performed. The properties must be separated by a semicolon.
<Sought Value 1>: Any type
Value of element whose subscript or property is requested. A value must be indicated for each column or property specified in <Columns>.
<Sought Value 2>: Any optional type
Value of element whose subscript or property is requested. A value must be indicated for each column or property specified in <Columns>.
<Sought Value N>: Any optional type
Value of element whose subscript or property is requested. A value must be indicated for each column or property specified in <Columns>.
<Start Subscript>: Optional integer
Start position for the search (linear search only). This parameter is not required for a binary search.

Seeking an element in a one-dimensional array of structures, classes, advanced types or records Hide the details

<Result> = ArraySeek(<Array Name>, <Type of Search>, <Sought Members>, <Sought Value 1 > , [ <Sought Value 2> [ ... [, <Sought Value N>]]] [, <Start Subscript>])
<Result>: Integer
Subscript of sought element, -1 if the element is not found in the array.
<Array Name>: Array
Name of Array variable to use. This array must be a one-dimensional array. This array can be:
  • an array of classes,
  • an array of structures,
    PHP No search can be performed in an array of structures.
  • an array of advanced types,
  • Versions 22 and later
    WINDEVWEBDEV - Server codeWindows Mobile an array of records.
    New in version 22
    WINDEVWEBDEV - Server codeWindows Mobile an array of records.
    WINDEVWEBDEV - Server codeWindows Mobile an array of records.
<Type of Search>: Integer constant
Type of search to perform:
asBinaryBinary search.
This search mode is fast but it must be used on an array sorted in ascending order, without duplicates, and by using exactly the same search options as the ones used for the sort (ArraySort).
This search mode can also be used when performing a search on a single member.
asLinearLinear search. The search starts:
  • from the first element
  • from <Start Subscript>
The search stops as soon as an element is found.
asLinearLastLinear search from the last element. This constant must not be used if <Start Subscript> is specified.
asLinearPreviousLinear search for the previous element. This search is performed from the current position or from <Start Subscript>.
asLinearFirstLinear search from the first element. This constant must not be used if <Start Subscript> is specified.
asLinearNextLinear search for the next element. This search is performed from the current position or from <Start Subscript>.
Versions 17 and later
The type of search can be combined with one or more search options:
tccLexicographicOrderArray sorted according to the linguistic order.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
WEBDEV - Browser code This constant is not available.
tccRespectNumericArray sorted according to the order of numeric values.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
WEBDEV - Browser code This constant is not available.
tccIgnoreAccentSearch while ignoring the accented characters.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
WEBDEV - Browser code This constant is not available.
tccIgnoreCaseSearch while ignoring the case.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
tccIgnoreSpaceSearch while ignoring the space characters found at the beginning and at the end of strings.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
Versions 20 and later
tccIgnoreInsideSpace
New in version 20
tccIgnoreInsideSpace
tccIgnoreInsideSpace
Search while ignoring the space characters found inside the strings.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
tccIgnorePonctuationAndSpaceSearch while ignoring the space characters and the punctuation characters.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
WEBDEV - Browser code This constant is not available.
AndroidAndroid Widget JavaPHP The constants used to define the search options are not available.
New in version 17
The type of search can be combined with one or more search options:
tccLexicographicOrderArray sorted according to the linguistic order.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
WEBDEV - Browser code This constant is not available.
tccRespectNumericArray sorted according to the order of numeric values.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
WEBDEV - Browser code This constant is not available.
tccIgnoreAccentSearch while ignoring the accented characters.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
WEBDEV - Browser code This constant is not available.
tccIgnoreCaseSearch while ignoring the case.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
tccIgnoreSpaceSearch while ignoring the space characters found at the beginning and at the end of strings.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
Versions 20 and later
tccIgnoreInsideSpace
New in version 20
tccIgnoreInsideSpace
tccIgnoreInsideSpace
Search while ignoring the space characters found inside the strings.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
tccIgnorePonctuationAndSpaceSearch while ignoring the space characters and the punctuation characters.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
WEBDEV - Browser code This constant is not available.
AndroidAndroid Widget JavaPHP The constants used to define the search options are not available.
The type of search can be combined with one or more search options:
tccLexicographicOrderArray sorted according to the linguistic order.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
WEBDEV - Browser code This constant is not available.
tccRespectNumericArray sorted according to the order of numeric values.
This option is useful for a dichotomous search and it has no effect on a linear search.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
WEBDEV - Browser code This constant is not available.
tccIgnoreAccentSearch while ignoring the accented characters.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
WEBDEV - Browser code This constant is not available.
tccIgnoreCaseSearch while ignoring the case.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
tccIgnoreSpaceSearch while ignoring the space characters found at the beginning and at the end of strings.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
Versions 20 and later
tccIgnoreInsideSpace
New in version 20
tccIgnoreInsideSpace
tccIgnoreInsideSpace
Search while ignoring the space characters found inside the strings.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
tccIgnorePonctuationAndSpaceSearch while ignoring the space characters and the punctuation characters.
This option is applied to all members on which the search is performed.
This option is useful for the "character string" members.
WEBDEV - Browser code This constant is not available.
AndroidAndroid Widget JavaPHP The constants used to define the search options are not available.
For a dichotomous search, the search options must be exactly the same as the options that were used to sort the array (see ArraySort).
<Sought Members>: Character string (with quotes)
  • Structures and classes: Name of sought members. If several members are sought, their names must be separated by a semicolon. You also have the ability to chain the sought members (by using "." or ":" between the members). In a class, you also have the ability to perform a search on the class properties.
  • Advanced types: Name of sought properties. If several properties are sought, their names must be separated by a semicolon. You also have the ability to chain the sought properties (by using "." or ":" between the properties). For example, "Border.Color".
  • Versions 22 and later
    Records: Name of sought items. If several items are sought, their names must be separated by a semicolon. You also have the ability to chain the sought items (by using "." or ":" between the properties).
    New in version 22
    Records: Name of sought items. If several items are sought, their names must be separated by a semicolon. You also have the ability to chain the sought items (by using "." or ":" between the properties).
    Records: Name of sought items. If several items are sought, their names must be separated by a semicolon. You also have the ability to chain the sought items (by using "." or ":" between the properties).
<Sought Value 1>: Any type
Value of element whose member or property is requested. A value must be indicated for each member specified in <Sought Members>.
<Sought Value 2>: Any optional type
Value of element whose member or property is requested. A value must be indicated for each member specified in <Sought Members>.
<Sought Value N>: Any optional type
Value of element whose member or property is requested. A value must be indicated for each member specified in <Sought Members>.
<Start Subscript>: Optional integer
Start position for the search (linear search only). This parameter is not required for a binary search.

Seeking the subscript of an object in a one-dimensional array (syntax for the databinding) Hide the details

<Result> = ArraySeek(<Array Name> , <Type of Search> , <Sought Object>)
<Result>: Integer
Subscript of sought object, -1 if the object is not found in the array.
<Array Name>: Array
Name of Array variable to use. This array must be a one-dimensional array. This array can be an array of classes, dynamic classes, structures, dynamic structures, advanced types, dynamic advanced types.
<Type of Search>: Integer constant
Type of search to perform:
asLinearLinear search.
<Sought Object>: Any type
Instance of sought object.
Remarks

Various

  • This function cannot be used on the fixed arrays.
  • This function can be used on the arrays of advanced variables.
  • This function cannot be used on the array of "Dynamic objects". The type of the objects must be specified.
  • This function must be used on the arrays of objects with a defined type.
    • For example, no search can be performed in the following array:
      t is array of 2 objects dynamic
    • On the contrary, a search can be performed in the following array:
      t is array of 2 MyClass

      t is array of 2 MyClass dynamic
  • No search can be performed on an array of variants.
  • AndroidAndroid Widget Java If the type of the search is dichotomous and if the array is not sorted, no WLanguage error will be displayed but the result of the search will be undefined.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
WEBDEV - Browser code WDJS.DLL
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
ArraySeek é obrigatório usar em column usar texto entre aspas
Prezados,

ArraySeek é obrigatório usar em column usar texto entre aspas:

arrMyArray is array of 0 string
// Fill the array
ArrayAdd(arrMyArray, 1)
ArrayAdd(arrMyArray, 2)
ArrayAdd(arrMyArray, 3)

// Find "2"

ResSubscript is int
ResSubscript = ArraySeek(arrMyArray, asLinearFirst, "2") //USAR ASPAS

Info("The 2 string is found at subscript: " + ResSubscript)

// Returns: "The 2 string is found at subscript: 2"
BOLLER
Mar. 07 2017
seek using a Structure`
 x = ArraySeek(ArrayVar,searchtype,"element1;element2",value1,value2)
Andy <<cowboy>>
Mar. 05 2012