ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Various properties
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The Exist property determines if the element of an associative array exists.
Example
// Associative array of integers
// indexed on strings and with duplicates
aaIDPerCustomer is associative array of int
// Add the identifier of customer "A"
aaIDPerCustomer["A"] = 55
// Add the identifier of customer "B"
aaIDPerCustomer["B"] = 321
 
IF aaIDPerCustomer["A"]..Exist = True THEN
Info("At least one element A exists")
END
Syntax
<Result> = <Element used>.Exist
<Result>: Boolean
  • True if the specified element exists (is not empty),
  • False otherwise.
<Element used>: Element of an associative array
Name of element to use (element of associative array).
Remarks
The Exist property determines if the element of an associative array exists.
  • For an associative array without duplicates, the Exist property is set to True if the element exists.
  • For an associative array with duplicates, the Exist property is set to True if at least one element exists.
Minimum version required
  • Version 21
This page is also available for…
Comments
array , ver se existe
array , ver se existe

IF _array[EDT_DigiteCodigo]..Exist = True THEN
InfoWithTimeout(5000,"Ja Existe esse codigo")
ELSE
_array[EDT_DigiteCodigo]=EDT_NomeTecnico
TableAddLine(TABLE_tecnico,EDT_NomeTecnico,EDT_DigiteCodigo)
END
EDT_DigiteCodigo=0
EDT_NomeTecnico=""
ReturnToCapture(EDT_DigiteCodigo)

//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/09/curso-windev-string-020-array.html
https://www.youtube.com/watch?v=6lWd1JxbTTM

De matos
22 Sep. 2016

Last update: 05/26/2022

Send a report | Local help