Siebel VB Language Reference > Siebel VB Language Reference >

Const Statement


This standard VB statement declares symbolic constants for use in a Basic program.

Syntax

[Global] Const constantName [As type] = expression [, constantName [As type] = expression] ...

Argument
Description
constantName
The variable name to contain a constant value
type
The data type of the constant (Number or String)
expression
Any expression that evaluates to a constant number

Returns

Not applicable

Usage

Instead of using the As clause, the type of the constant can be specified by using a type character as a suffix (# for numbers, $ for strings) to constantName. If no type character is specified, the type of constantName is derived from the type of the expression.

To specify a Global Const, you must follow the same rules as for declaring a Global variable: It must be declared in the (general) (declarations) section of the modules in which you wish to access the Global variable.

Example

For an example, read CLng Function.

See Also

Declare Statement
Deftype Statement
Dim Statement
Let (Assignment Statement)
Type Statement


 Siebel VB Language Reference
 Published: 18 June 2003