.


:




:

































 

 

 

 


. . . . ( . 76,77)

End If

.

If

1. ElseIf Else .

.

If Fa * Fb < 0 Then

b = c

Fb = Fc

End If

2. If ElseIf.

3. If.

4. VB , Then. Then ( ), .

5. If, ElseIf, Else, End If .

6. End If.

:

_1;

_1 , _1, , ;

_1 , ElseIf. , , , ;

ElseIf ( ), Else ( _N+1).

*

1. .

2. .

3. .

4. , .

 

 

. . . . ( .81)

.

:

If Then _1 (Else _2)

, 1. , 2, , . , .. .

:

If then

1

Else If 2 then

2

Else If n then

n

Else

n+1

End If

:

1. ElseIf Else

2. If ElseIf

3. If

4. VB , then. Then ( ), .

5. If, ElseIf, Else, End If .

6. End If

:

1. _1

2. _1 , _1, ,

3. _1 , ElseIf. , , , .

4. ElseIf ( ), Else ( _n+1)

. . . . ( . 76,77)

- . , .

() , .

Dim . VB . .

.

, , .

:

1. () () (, , ), .

Dim R () AS Single

2. ReDim .

27. ForNext. . . . ( . 88)

ForNext .

For V=a1 To a2 (step a3),

V- ()

a1

2

3 (, )

, .

:

()

28. ForNext. . .

. .27

For... Next . , For...Next. . , , .

:

1. 1, 2, 3

2. .

3. . , .4. , .

4. , .

5. . . .3

 

 

27 Do... Loop.

DoLoop

DoLoop , End ( Loop ""):

Do While () Loop - , True ( While - ""), . . , ;

^ Do Loop While () , . . ( ), , True;

Do Until () Loop - , False ( Until " ");

^ Do Loop Until () - , , False.

DoLoop , End ( Loop "")

:Do While () Loop - , True ( While - ""), . . , ;

^ Do Loop While () , . . ( ), , True;

Do Until () Loop - , False ( Until " ");

^ Do Loop Until () - , , False.

 

30. (Sub) - , , , , .
-, "" (Function) .
(. ., ) . , :
Function ( As Currency, As Single) As Currency
= *
End Function
.
, () , Function.
^ :
Private Sub Command1_Click()
Dim Tax As Currency
Tax= (100, 0.2)
Print Tax
End Sub
, , . ., :
= (1, 2, )
, , , :
1, 2,
, , :
1 " ", " ..."
.

 

 

31. Function Visual Basic, Function End Function. Function . .

, Function End Function, Exit Function Return.

Function , . (Public), , , , .

Function , , , .

 

Visual Basic

 

Visual Basic , Microsoft.VisualBasic. , Beep, MsgBox StrComp. , Function.

32.. VBA

Excel:

  • Application
  • WorkBook
  • WorkSheet
  • Chart

, , , ... , Visual Basic (Alt + F11), 1 . .

 

33.

- , , .

, . (- , )

-

-

- , .

-

-

 

sub . , .

C- .

 

[Public (private)] [static] Sub () ()

[ ]

[exit sub]

..

[]

End sub

 

34.

-

Call () [ ]

:

1. call

2.

3. .

4. , .

 

 

35. MATHCAD. .

 

.

MathCad :

-

-

-

-,

- Windows

 

:

- , , .

- , , .

-

-

- , ,

- .

 

36. . . . .

 

:

- (Standard) , , , ;

-(Formatting) ( , . .) ;

- (Math) ;

-(Resources) Mathcad (, , . .);

- (Controls) ( , . .)

 

:

- (Calculator) , - ;

- (Graph) ;

- (Matrix) ;

- (Evaluation) ;

- (Calculus) , , ;

- Boolean (Boolean) () ;

- (Programming) Mathcad;

- (Greek) ;

- (Symbolic) .

 

37. . . .

, , .

. . , .

, -

.

 

 



<== | ==>
, .. |
:


: 2017-03-18; !; : 409 |


:

:

: , .
==> ...

1641 - | 1608 -


© 2015-2024 lektsii.org - -

: 0.045 .