9.0

126
condexpr definition
An expression that returns a numeric result. If the result is zero then the conditional is False. If the result is
non-zero then the conditional is True
.
0 'false
-1 'true
X > 20 'true if X is greater than 20
S$ = "hello" 'true if S$ equals "hello"
Const Definition
Syntax
[ | Private | Public ] _
Const name
[type] [As Type] = expr[, ...]
Group
Declaration
Description
Define name as the value of expr. The expr can refer to other constants or built-in functions. If the type of the
constants is not specified, the type of expr
is used. Constants defined outside a Sub, Function or Property block are
available in the entire macro
/module.
C:\ABCTemp\vbs\Private_Keyword.htm
Private
is assumed if neither Private or Public is specified.
Note: Const statement in a Sub
, Function or Property block may not use Private or Public.
Example
Sub Main
Const Pi = 4*Atn
(1), e = Exp(1)
Debug
.Print Pi ' 3.14159265358979
Debug
.Print e ' 2.71828182845905
End
Sub
Cos Function
Syntax
Cos(Num)
Group
Math