Small company logo:
   History
 
Advertising banner:
 
 Dim
 
Purpose
Declares a variable and allocate storage memory.
Syntax
Dim VarName As VarType
Dim VarName (ArrayUpperBound) As VarType
Dim VarName (ArrayLowerBound To ArrayUpperBound) As VarType
Dim VarName As String * Length
Dim VarName1 As VarType, VarName2 As VarType...


VarName
Any valid alphanumeric string, as long as it does not begin with a decimal number (0-9) or an underscore (_).
Underscores and decimal numbers are allowed in any other location in the variable name.
VarType
Valid variable types are Integer, Long, Single, Double, Date, Currency, String, File, FCFormVar, FCControlVar, StatsEvent, ServerDirectory, ServerFile, ServerControl, Socket, and user-defined types.
FCFormVar and FCControlVar let you pass forms and controls defined in the development environment into subs and functions to create generic handling routines.
ServerDirectory lets you access information in the FirstClass Directory.
ServerControl allows administrative-level manipulation of the FirstClass server.
Socket lets you work with Internet socket connections.
Array...Bound
Variables of up to 61 dimensions, with no more than 1,000,000 elements.
Length
A string variable of a fixed length. The length argument can be any valid number that indicates the maximum length of the string.

Examples
Dim i As Integer
Dim MyArray(10) As Integer                      'declare an integer array of 10 elements (0-9)
Dim MyArray(0 To 9, 0 To 9) As Double   'declare a two-dimensional array
Dim str2 As String * 100                                'declare a fixed-length string of 100 characters

Sub Main
ShowForm(frm1)
ShowForm(frm2)
End Sub
Sub ShowForm(frm as FCFormVar)
frm.Show
End Sub