<< Click to Display Table of Contents >> Navigation: ThinBASIC Core Language > BuiltIn Functions > Inspecting UDT (Types) > UDT_ElementExists |
Description
Checks if an element name exists inside an UDT (User Defined Type) variable.
Syntax
RetCode = UDT_ElementExists(UdtElement)
Returns
Number
Negative values means error, usually UDT element does not exists
Parameters
Name |
Type |
Optional |
Meaning |
UdtElement |
UDT structure |
No |
An UDT element name |
Remarks
Restrictions
See also
Examples
Uses "Console"
Type tUDT
a As Byte
b As Integer
c As Long
End Type
Dim v As tUDT
v.a = 1
v.b = 2
v.c = 3
PrintL UDT_ElementExists(v.a) , "expected 1"
PrintL UDT_ElementExists(v.xx), "expected 0"
WaitKey