.


:




:

































 

 

 

 


. ,




, . . ( ) , .

, . Visual Basic (VB) :

:

- Byte 1 , 0 255;

- Integer 2 , 32768 32767;

- Long 4 , 2 2.

:

- Single 4 , ;

- Double 8 , Single. (, ).

, ().

:

Dim < > As < >.

, ( ) vozr Byte ( 255 )

Dim vozr As Byte,

sr_ball ( ).

Dim sr_ball As Single.

: + (), (), * (), / (), \ ( ), ^ ( ), mod ( ). . , : , , . . .

, 2 + 3*6 20, (2+3)*6 30.

VB : abs( x ) ; sqr( x ) , atn( x ) ; cos( x ) ; sin( x ) ; tan( x ) ; log( x ) , exp( x ) , x . , VB, , .

y = VB : y = sin(x^2) + sqr(tan(x)) * (x + 5) ^ (1/5).

, .

VB . VB () Windows →→Microsoft Visual Studio→
Microsoft Visual Basic
. New Standard EXE . , , . CommandButton, TextBox, Label ( General).

CommandButton () .

TextBox ( ) .

Label () .


y = .

. TextBox. General TextBox. . y. Label. General Label . CommandButton, y , x. , . 1.

. , . . ( Name) .

 

. 1.

 

Command1 , Properties Caption . Label1 Form1.

, Text1, Text. Text 0.

. Windows , . y Click ( ) Command1.

, View Code ( Project ).

.
, , .
Command1, Click.

VB , Command1. :

Private Sub Command1_Click()

End Sub

 

ln( x ) , lnx, ln( x ), . VB log().

:

Private Sub Command1_Click()

Dim x As Double

Dim lnx As Double x

Dim y As Double

x = CDbl(Text1.Text)

lnx = log(x)

y = 2*lnx log(7*x 12) lnx^2+7*x*log(7*x 5)/log(10)

Label1.Caption = CStr(y)

End Sub

Text1.Text Text Text1. Text . CDbl Text, , Double. , x Double. CStr y Double , Caption Label1. Caption .

, CDbl, CStr, CByte, CInt, CLng, CSng .

FileSave Project. , . . : vbp ( ) frm ( ).





:


: 2017-02-25; !; : 374 |


:

:

80% - .
==> ...

1559 - | 1423 -


© 2015-2024 lektsii.org - -

: 0.013 .