Working With Integers (Continue)
Answer:
0
20
Blah
30
Why is that?
Lets pass over the code line after line:
Dim Blah As Integer
A new Integer with the name Blah has been declared
Print Blah
Will print the Value that found in the Blah variable.
But there is nothing in the Blah variable!
The Blah variable has just been declared, and we
didn't put inside it any value yet.
The default value of any integer variable is 0.
When you write :
Dim Blah As Integer
It's like you've written:
Dim Blah As Integer
Blah = 0
So it will print the value that found right now
in the Blah variable - 0
Blah = 10
Now the Blah variable holds the number 10
Blah = 20
Now the Blah variable holds the number 20
What's happened to the 10 that was inside it?
It has been deleted!
A variable can holds only one value, and when
you put in it a value, the old value is being immediately deleted.
So what is the differents between
Blah = 20
and
Blah = 10
Blah = 20
?
There is no differents!
In both cases the Blah variable will hold the number 20
Print Blah
Will print the value that found right now
in the Blah variable - 20
Blah = 30
Now the Blah variable holds the number 30
Print "Blah"
Will print the Text that found between the quotes - Blah
Print Blah
Will print the value that found right now
in the Blah variable - 30
Popular Posts
-
<%@page contentType="text/html" import="java.util.*" %> <!-- http://www.roseindia.net/jsp --> ...
-
Now I will show you how to retrieve the data posted from a HTML file in a JSP page. Consider an html page that prompts the user to enter his...
-
In this section we are going to implement insert data, delete data, and update data using with JDBC database and also using of JavaScript. ...
-
In this lesson we will learn about the various tags available in JSP with suitable examples. In JSP tags can be devided into 4 different typ...
-
Syntax of JSP Scriptles are: <% //java codes %> JSP Scriptlets begins with <% and ends %> .We can embed any a...
-
This chapter talks about installing SQL Server Express. If you have a licensed version of full SQL Server 2005, you can follow the same step...
-
As you already learned, the core part of SQL Server system is the 'server' which runs as a service. The service is a hidden applicat...
-
SQL Server (and SQL Server Express) supports two authentication modes: 1. Windows Authentication mode 2. Mixed Mode (Windows Authentication ...
-
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...
-
5.1 The .NET Framework: Big Picture Figure 5‑1 The .NET Framework in Context Looking at Figure 5‑1 we see the lifespan of managed c...
No comments:
Post a Comment