Learning about Variables
Using Variables is one of the most basic and important subjects
in programming, so this lesson is very important.
Variables are destined to save data.
You can save in variable Text or number.
For example, you can have one variable that holds the Text "Hello and Goodbye",
and have another variable that holds the number 623882
You can think about variables as a cabinet's drawers.
Every drawer has a sticker on it with its unique name.
You can put in each one of the drawers one number or one text String.
During your program, you can open the drawer with the sticker "TheUserName"
and get the text string that found inside the drawer.
You can also delete the text string that found inside the drawer
and put instead of it other text string.
Right now, we are going learn about 2 variable types.
The first type called Integer.
Integer variable can store an Integer number (round number without any fraction)
between -32,768 to 32,767.
You can store in Integer variable the number 0 or the number 375 or
the number -46, but you can't store the number 4.5 (Because of the .5)
or the number 100,000 (Because It's bigger than 32767) or the
number -50,042 (Because it's smaller than -32,768)
The second type called String.
You can store in String variable any text that you want.
For example "Hello" or "abcDDefGhIjk123456 blah blah %$#@!??? Blah!"
Popular Posts
-
Input/Output with files C++ provides the following classes to perform output and input of characters to/from files: * ofstream: Stream c...
-
Getting Started Note that all the images in this tutorial taken from Visual Basic version 6.0. If you using other version of Visual Basic, t...
-
SQL Server (and SQL Server Express) supports two authentication modes: 1. Windows Authentication mode 2. Mixed Mode (Windows Authentication ...
-
Methods A Method is a procedure built into the class. They are a series of statements that are executed when called. Methods allow us to han...
-
Data Access with Server Explorer Visual Basic allows us to work with databases in two ways, visually and code. In Visual Basic, Server Explo...
-
5.2 .NET Application Scenarios Managed code can be used to develop a variety of different kinds of software. First, it is worth men...
-
Changing the button's Properties Now you have a button on your form. You can change its location by dragging it, and change its size by ...
-
Console Applications Console Applications are command-line oriented applications that allow us to read characters from the console, write ch...
-
Conditional Statements If....Else statement If conditional expression is one of the most useful control structures which allows us to execut...
-
The Command Button's KeyPress, KeyDown and KeyUp Events The events that will be mentioned in the following pages are commonly used, and ...
No comments:
Post a Comment