{{sidenavigation.sidenavigationExpandLabel}}
{{getMsg('Help_YouAreHere')}}: {{page.title}} {{page.title}}
{{$root.getMsg("downLoadHelpAsPdf")}} {{helpModel.downloadHelpPdfDataStatus}}

Variable declaration operators

Basic Syntax:

Variable "formula"

To specify the return value of a formula a value must be assigned to the variable formula at the end of each formula. Otherwise, the formula is erroneous.

Dim x As Number
x = 5
formula = x

Variable Declaration

Dim x  ' single variable without defined type
Dim x ()  ' array variable without defined type
Dim x As //(type)// [range]  ' single variable with type (type), optional a range of type (type)
Dim x () As //(type)// [range]  ' array variable with type (type), optional an array of ranges of type (type)

Declares a variable of type (type). The keywords Local, Global, and Shared can be used instead of Dim to select the scope of this variable.

The following declarations are possible:

  • Dim x
  • Dim x As Boolean
  • Dim x As Currency
  • Dim x As Currency Range
  • Dim x As Date
  • Dim x As Date Range
  • Dim x As DateTime
  • Dim x As DateTime Range
  • Dim x As Time
  • Dim x As Time Range
  • Dim x As Number
  • Dim x As Number Range
  • Dim x As String
  • Dim x As String Range
  • Dim x()
  • Dim x() As Boolean
  • Dim x() As Currency
  • Dim x() As Currency Range
  • Dim x() As Date
  • Dim x() As Date Range
  • Dim x() As DateTime
  • Dim x() As DateTime Range
  • Dim x() As Time
  • Dim x() As Time Range
  • Dim x() As Number
  • Dim x() As Number Range
  • Dim x() As String
  • Dim x() As String Range

Crystal Syntax:

Variable Declaration

Local //(type)//Var [range] [array] x

Declares a variable of type (type). The keywords Global and Shared can be used instead of Local to select the scope of this variable. With the optional flags [range] and [array] you can create ranges or array of the selected type and scope. Arrays of range values are possible as well.

The following declarations are possible:

i-net Clear Reports
This application uses cookies to allow login. By continuing to use this application, you agree to the use of cookies.


Help - Variable declaration operators