Creates a user-defined type.
TYPE
user_typename
element_name AS typename
END TYPE
user_typename is the name of the user-defined type.
element_name is the name of an element in a record.
typename is the element’s type: INTEGER, LONG, SINGLE, DOUBLE, fixed-length string (for example, STRING * 4), or another user-defined type.
TYPE
creates a template for future variable declarations. To create a variable of this type, you must use DIM, REDIM, COMMON, STATIC or SHARED.
TYPE Employee
ename AS STRING * 20
salary AS SINGLE
END TYPE
DIM emp AS Employee
emp.ename = "Stephanie"
emp.salary = 30000
PRINT emp.ename, emp.salary
Results in:
Stephanie 30000