Working With Integers
The process of creating variable called "Declaring"
To Declare (=create) Integer variable simply write:
Dim MyTest As Integer
What does the line above do?
It creates an Integer variable with the name MyTest.
Dim = Declare
MyTest = the name of the new variable
As Integer = The new variable type will be Integer.
Now you can put a number inside this variable.
You can do that by simple write:
MyTest = 10
The line above will insert the number 10 into the MyTest variable.
Now the MyTest variable stores the Number 10, but how
can you access this value from your program?
You can do that using the variable name. Example:
Print MyTest
The line above will write 10 on the form.
Pay attention to the differents between
Print MyTest
and
Print "MyTest"
Where you putting a text inside quotes (Like in the bottom line),
Visual Basic treat it as a Text, and will print it As-Is.
The Print "MyTest" Line will print MyTest on the form.
Where you putting a text Without quotes (Like in the upper line),
Visual Basic treat it as a variable name, and will print the value that found
in the variable.
The Print MyTest Line will print the value that found in
the MyTest variable, therefore it will print 10 on the form.
Popular Posts
-
Using DataReaders, SQL Server In this section we will work with databases in code. We will work with ADO .NET objects in code to create conn...
-
Syntax of JSP Declaratives are: <%! //java codes %> JSP Declaratives begins with with .We can embed any amount of java c...
-
request This is the HttpServletRequest associated with the request, and lets you look at the request parameters (via getParameter), the requ...
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>Using JavaServer Pages...
-
<%@page contentType="text/html" import="java.util.*" %> <!-- http://www.roseindia.net/jsp --> ...
-
In this section we are going to implement insert data, delete data, and update data using with JDBC database and also using of JavaScript. ...
-
When an HTTP client such as web browser sends a request to a wen server, along with the request it also sends some HTTP variables like Remot...
-
JSP pages are high level extension of servlet and it enable the developers to embed java code in html pages. JSP files are finally compiled ...
-
Syntax of JSP Scriptles are: <% //java codes %> JSP Scriptlets begins with <% and ends %> .We can embed any a...
-
Learning about Parameters (Continue) Look at the first line of the Command Button's KeyDown Event: Private Sub Command1_KeyDown(KeyCode ...
No comments:
Post a Comment