17-09-2016, 03:40 PM
1455184506-AQAASCOMP1VBConsoleStudentBooklet.pdf (Size: 394.49 KB / Downloads: 13)
Example Program 16 - Data Structures
Visual Basic has many data type such as Integer, String, Double, Single, etc. Aside from those intrinsic
data type that has been provided by VB, you can create your own data type by combining several
different types. This UDT is useful to create single variable contain several useful information. It is
usually useful for database record. You define the UDT using syntax:
Type VariableType
Variable1 as varType1
Variable2 as varType2
….
VariableN as varTypeN
End Type
After that you can declare any name as this new variable type and use it as ordinary variable.
Note: Special for this project, please do not copy and paste from this tutorial. Type the code
manually so that you may understand the different between UDT and normal variable.