PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

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
..Exist is used to find out whether an element of an associative array exists or not.
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 name>..Exist
<Result>: Boolean
  • True if the specified element exists (is not empty),
  • False otherwise.
<Element name>: Character string (with or without quotes)
Name of element to use (element of associative array).
Remarks
..Exist is used to find out whether an element of an associative array exists or not.
  • For an associative array without duplicate, ..Exist is set to True if the element exists.
  • For an associative array with duplicates, ..Exist 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