Abs ( x )
Cint ( x )
,
Fix ( x )
,
Int ( x )
,
Sqr ( x )
Sin ( x )
Cos ( x )
Tan ( x )
Atn ( x )
Rnd
0 1
Pmt (., , )
PV (., , )
Rate ( , , )
,
InStr (, )
Lcase ()
Left (, )
Len ()
Mid (, , )
,
Right (, )
Trim ()
Ucase ()
. . .
Time
Timer
Now
Date
Month ()
Year ( )
Day
WeekDay( )
( 1 .)
InputBox ([, ] [, ] [,X] [,Y])
X,Y
MsgBox ( [, , ])
Ok
Ok,
, ,
, ,
,
,
,
VbOk)
VbCancel)
VbAbort)
VbRetry)
VbIgnore)
VbYes)
VbNo)
|
|
|
Visual Basic (if-then-else). .
If... Then... Else
, . If... Then... Else...(... ... ...) - ( ) ( ).
:
If _ Then __1 [Else __2 ]
_ , __1, __2. Else , ,, _ , __1 .
1:
, 2, - 3
If A>0 Then S= A^2 Else S=A^3
2:
,
If A=B Then Exit Sub
:
If __1 Then
__1
[ElseIf __2 Then
__2
....................................
[Else
__n
End If
__1 , __1, , __2 , __2 .. , __n, Else.
1:
, , - .
If A>0 And B>0 Then
Print A+B
Print A*B
Else
End If
2:
10, 2 , 10 20, 3 , - 10 .
If B<10 Then
B=B*2
ElseIf B>=10 And B<=20 Then
B=B*3
Else
B=B/10
End If