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
-
Defined data types (typedef) C++ allows the definition of our own types based on other existing data types. We can do this using the keyword...
-
Learning about Parameters Parameters are variables that being passed to a Sub. Look at the first line of the Command Button's Click even...
-
Introduction: In this exercise, you will exercise the concept of comparing objects using String class as an example. Steps to follow: 1. Wri...
-
Steps to follow: 1. Write an abstract class called LivingThing.java as shown below in Code-11.4.a. (You are welcome to do this work using ei...
-
5.3 Draw.aspx Web Applications I am just about to finish this tutorial. I have given you a couple of code samples to chew on, but t...
-
OPERATORS: There are 7 operators they are: 1.Arithmetic operators : +,-,*,/,% : addition,subtraction,multiply,division...
-
4 Reusable Components and the FCL Up to this point I have spoken quite a bit about the goals of the .NET Framework, as well as what it ...
-
Differences Between Java and C/C++ It is no secret that the Java language is highly derived from the C and C++ languages. Because C++ is cur...
-
Advantages of MS Access MS Access is a light weight database managements system. Also, it provides it's own designer so that you can gen...
-
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...
No comments:
Post a Comment