Page 105 - TechPluse_C7_Flipbook
P. 105
Conditional and Looping
9 Statements in BASIC-256
Your Aim
to learn about:
Conditional Statements Looping
BASIC-256 is a beginner-friendly programming language designed to simplify text-based
coding.
The name stands for Beginners All-purpose Symbolic Instruction Code, emphasising
accessibility.
It operates within an Integrated Development Environment (IDE) with a code editor, text
output area, toolbar, and graphics output area.
Programs consist of statements, with each line representing an instruction.
Key statements include PRINT (displays output), INPUT (accepts user input), and REM/#
(adds comments).
Variables store data, including numbers (numeric variables) and text (string variables), and
can change during execution.
Operators enable calculations and comparisons, including arithmetic (+, -), logical (and, or),
and relational (<, >).
Programs can be saved in the .kbs format and run using the toolbar or F5 key.
The PRINT statement displays output, and a semicolon allows continuation on the same line.
REM or # is used for comments, improving readability without affecting execution.
The END statement marks the program’s termination, preventing further execution.
The INPUT statement allows user input with prompts for guidance.
The IF statement enables conditional execution, executing different commands based on
conditions.
Conditional and Looping Statements in BASIC-256 103

