Page 99 - TechPluse_C6_Flipbook
P. 99
OPENING A PROGRAM
Follow these steps to open a BASIC-256 program.
Step 1 Click on the Open command button in the toolbar. The Open a file dialog box
appears.
Step 2 Browse to the location of your saved program.
Step 3 Select the program you want to open.
Step 4 Click on Open button. The program will open.
ELEMENTS OF BASIC-256 PROGRAMMING
We will now learn about the basic elements of the BASIC-256 programming language.
Variables
A variable is used to store different kinds of information, such as text or a number, in the
computer’s memory. When we store a value or information in a variable, it overwrites the previous
information stored in it. It can contain different values at different points in time.
To create variables in BASIC-256, we use the assignment operator. Following are the examples
of defining variables:
Number = 5
Fruit = "Apple"
Marks = 50.5
Types of Variables
Numeric Variable: Numeric variables are used to store numbers for calculations. They can
hold integer and decimal numbers. The numeric variables that hold integers are called Integer
variables. The numeric variables that hold decimal numbers are called Floating variables.
For example: 22, -34 and 9.25
String Variable: Strings are a set of characters, that can be a mixture of numbers, letters and
other characters.
For example: "Hello World!", "123 Random Road", "abcde", "88 Golf Course Road" and
"12345-8976"
Rules for Naming Variables
The names we give to the variable are called identifiers. Variable name can include letters
(lowercase and uppercase), digits (0 to 9), and underscore (_) character. To name the variables,
follow the following rules:
Variable name should always start with a letter or underscore.
Variable name can only use letters, digits, underscore and Dollar ($).
Name of the variables should describe the values that they store.
Introduction to BASIC-256 97

