PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

This content has been translated automatically. Click here to view the French version.
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
The Property Exists allows to know if an element of an associative array exists or not.
Example
// Tableau associatif d'entiers
// indexé sur des chaînes et avec doublons
taIDParClient is associative array of int
// Ajout de l'identifiant du client "A"
taIDParClient["A"] = 55
// Ajout de l'identifiant du client "B"
taIDParClient["B"] = 321
 
IF taIDParClient["A"]..Exist = True THEN
Info("Il existe au moins un élément A")
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 Property Exist allows to know if an element of an associative array exists or not.
  • In the case of an associative array without duplicates, the Exist property is True if the element exists.
  • In the case of an associative array with duplicates, the Exist property is 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