Constants:


*      A constant is a meaningful name that takes the place of a number or a string, and never changes.

*      VBScript itself has a number of defined intrinsic constants like vbOK, vbCancel, vbTrue, vbFalse and so on.

*      You create user-defined constants in VBScript using the Const statement.

Syntax:

          [Public | Private] Const ConstantName = ConstantValue

Example:

          intEmpId = 12345678

Note:

*      Keywords Public and Private are optional.

*      Constants are public by default.

*      Within procedures, constants are always private; their visibility can't be changed.

No comments:

Post a Comment