VB.NET . , Dim.
:
Option Explicit. Option Explicit, . Option Strict, . Option Explicit .
Option Strict. Option Strict On . , (, Integer Boolean), .
Option Compare. , (Binary) (Text).
. (x y) , (z = ).
<F9> , . . , , . <F10>,
z, . <F10>, . .
, ( ) , .
, Option Strict ( ). On .
, (. 4.2.8-6).
. 4.2.8-6.
. 4.2.8-7. VS,
x=TextBox1.Text, , Option Strict On String Double. , , Double. . , .
|
|
, , , (. .1.2-7).
Option Strict On Imports System.Math ' Public Class Form1 Private Sub Button1_Click(sender As Object, _ e As EventArgs) Handles Button1.Click Dim , y, z, m, n As Double, p As Single, k As Integer Dim s1, s2 As String = CDbl(TextBox1.Text) ' String Double y = CDbl(TextBox4.2.Text) z = (0.002 - Exp( ^ y)) / ((100 - y) * ( + 2)) p = CSng(z) ' Double Single k = CInt(z) ' Double Integer m = Fix(z): n = Int(z) s1 = CStr(z): s2 = CStr(p) ' String TextBox3.Text = CStr(z): TextBox4.Text = CStr(k) TextBox5.Text = CStr(m): TextBox6.Text = CStr(n) TextBox7.Text = CStr(p) TextBox8.Text = CStr(z + p) ' TextBox9.Text = s1 + s2 ' End Sub Private Sub Button2_Click(sender As Object, _ e As EventArgs) Handles Button4.2.Click End End Sub EndClass |
. 4.2.8-8. 2.1
, , , , , CDbl(). CStr() . ( k) z CInt(), , . , Option Strict On , .
. .1.2-8
.
2.2 . 2.2 , , .