BASIC Is An Acr-WPS Office
BASIC Is An Acr-WPS Office
students.
character set.
Alphabet A,B,C .. ,Z
Numeric 0,1,2,3,.... ,9
Minis (Subtraction)
Plus (Addition)
Left Parcnthesis
Right Parenthesis
Comma
Semi colon
Colon
Decimal Point
Greater than
Less than
Question Mark
Quotation Mark
Percent Symbol
Exclamation Mark
Ampersand &
and variable.
is a sequence of 0 - 255
example,
"TOLULOPE ODUDIMU'"
TONADPUBLICATION"
Constant Description
decimal points.
Floating-Point Positive or negative
to scientific notation). A
floating-point constant
constants is 3.0x10 to
235.988E-7 = 0.0000235988
2359E6 2359000000
&H76&H32F
example: &0347&1234
16 digits.
constantsS:
Single-Precision Double-Precision
Constants Constants
46.8 3456928 11
-1.09E-06 -1.09432D-06
3489.0 3490.0#
22.5! 7654321.1234
2 must be alphabetic
numeric
are
K$="Happy day
S String variable
Integer variable
Single-precision variable
# Double-precision variable
I1.6 DATA-NAMES
names is:
etc.
below:
declaration.
String Variable
variable
With
decimal fraction
tO a greater accuracyy
(b) BBC/Electron: No restriction onn
conventional manner.
LANGUAGE
programn.
Visual
categories:
(i) Arithmetic
(i) Relational
(ii) Logical
(iv) Functional
are
|Symbol
Addition A+B
Subtraction A-B
Multiplication A*B
Division A/B
is evaluated before an
() xponeitiation
cqual priorily)
priority)
right
. A/B step
example:A 7*(B^2+4)/X)
B2 stepl
equal
less than
greater than
first.
Operator Operation
AND Conjunctivn
preccdenee is OR)
EQV Tquivalence
TMP Tmplication
FUNCTIONS T MEANING
ATN(Y) Arctangent of Y
COS(Y) Cosine of Y
NTATEMENT
whero
the message:
WHAT
common practice to
STATEMENTS
categorized as follows:
INPUT. READ-DATA.
LET
statement.
specified.
Format: INPUTdata-name
the data-name X
name A$
NAME", N$
Will output to the terminal the prompt
variables in a program.
DATAStatement F'ormat
where values
statement.
10 DATAA
20 DATAB
30 DATAC
50 DATA 2, 3,4
to variables in a program.
READ Statement Format
10 READ A, B,C
20 DATA 5,8,3
Example 2
30 READNAME3$
40 READAGE3
AGE3
AGE2+AGE3
80 DATA 18
90 DATA BILL
100 DATA45
110 END
RUN [Return]
10 PRINT 'NUMBER
20 PRIN T OF
SCORES','AVERAGE'
30 PRINT
40 READNI
60 READN
70 IFN=OGOTO 210
80 LETS=00
100 READT
110 LETS=S+T
120 NEXTK
130 PRINTN, S, T
140 NEXTI
150 DATA5
210 END
PRINT statement
messages.
semicolons.
character printed.
For example:
LETSTATEMENT