Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

Static

  • Last UpdatedJul 18, 2023
  • 1 minute read

The Static statement allocates storage for-and declares the data type of-variables and arrays that will retain their values between subsequent references. Static variables are more commonly used within procedures (subroutines and functions), and have local scope.

Syntax

Static VariableName[(Subscripts)] [As DataType]

VariableName:

The required name of the variable being declared (dimensioned).

Subscripts:

The optional subscript range for an array.

DataType:

The optional VBA data type declaration for the variable.

Const | Dim | ReDim

Example

Static bytVar As Byte
Static binVar As Boolean
Static strVar As String
Static intVar As Integer
Static lngVar As Long
Static sngVar As Single
Static dblVar As Double
Static vntVar As Variant
Static objVar As Object
Static dtmVar As Date
Static udtVar As <UserDefinedTypeName>

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in