Programming in Basic languageThe most important commands from Basic programming language in one place, a unique comparison and each command-operator is shown using a piece of program. Statements-operators of these sample programs are clickable, so with a simple click we have more information available.
Programming language Basic:
Lexical elements are numeric, string constants and comments in the code.
Types and variables
Types and variables are closely related because variables are the most important elements of our program in which we store data, partial results of our calculations. Types tell us what data can be stored in variables.
Operators perform an operation between the operands, this operation can be mathematical, logical, or bitwise.
Statements are important elements for writing programs. Generally one statement line corresponds to one line program. The main group of the statements are: cycles, program branching and flow control.
i = x * 5 do while i>0 if i=10 then exit do else i=i-1 end if loop
Examples - Basic
i=10 do i=i-1 loop while i > 0 do i=i+1 if i=5 then exit do end if loop while i <10
BasicOther pieces of example codes:
do until i = 0 if i=10 then exit do else i=i-1 end if loop
5 < 3
(i and j) <> 64
x = &O12
z = (x-y)-30.5