
BASIC comparison sheet ProgsVarsMem Page 5
Programs, Variables and Memory
Vendor
Model
Variables
Numeric range
String variables
String too long
String literals
Character set
Lower case
Arrays
String arrays
Array dimensions
Automatic DIM
Clear variables
Programs, Variables and Memory
Sharp
PC-1500A PC-1403 PC-1280 PC-1475 PC-G850
PC-1210
PC-1211
PC-1212
PC-1245
PC-1246
PC-1247
PC-1248
PC-1251
PC-1401
PC-1421
PC-1260
PC-1261
PC-1262
PC-1350
PC-1360
PC-2500
PC-E220
PC-G820
PC-E500
PC-E500S
Fixed variables A-Z.
Single precision only Single precision only
DEFDBL/DEFSGL set default. Default is set with DEFDBL/DEFSGL.
Fixed string variables A$-Z$, 7 characters, share memory with A-Z.
N/A
Silent truncation
"String", "String "STRING", "STRING "String", "String – Trailing quote can be omitted on line end on all Sharp BASIC implementations
ASCII + symbols ASCII + japanese + symbols IBM-PC code page 437
Yes NO Yes
Single precision only. Single precision only.
N/A Two dimensions up to 255. Dimensions can be expressions.
All arrays must be defined.
CLEAR resets all fixed variables and deletes all automatic variables and arrays. CLEAR deletes all variables and arrays.
ERASE deletes selected arrays (except PC-1350.)
Fixed variables A-Z,
automatic two letter
variables. Longer names
are truncated. Undefined
variables return 0.
Fixed variables A-Z, automatic independent two letter variables. Longer names are truncated.
Undefined variables return 0.
PC-1421 has special variables for financial calculations:
n, i, PV, FV, PMT, CST, SEL, MAR, MU, NPV, IRR, PRN, INTE, BAL, SPRN, SINTE
Long variable names, case insensitive, up to
32 chars. Must not start with keyword.
Longer names are truncated. All variables
are automatic and independent. Undefined
variables return 0.
DEFDBL, DEFSGL and
suffixes # and ! allow double
and single precision.
DP variables are always
independent. A!-Z! are
identical to fixed variables A-
Z.
DEFDBL, DEFSGL and suffixes # and ! allow
double and single precision. Single and
double precision variables are independent
from each other.
BCD, 10 digits, 2 digits exponent. Internal accuracy up to 12 digits.
The PC-1211/1248 have a special symbol for the exponent (leading 1 can be omitted)
BCD,
10 digits or 20 digits,
2 digits exponent.
BCD, 10 digits,
2 digits exponent.
BCD, 10 digits or 20 digits, 2 digits
exponent.
Fixed string variables A$-
Z$, independent of A-Z.
Automatic two letter (+$)
string variables, 16
characters for all types.
Undefined string variables
return an empty string.
String variable names follow the rules of
numeric variables+$.
String length is dynamic up to 254
characters. Undefined string variables return
an empty string.
Automatic two letter (+$) string variables, 16 characters. Undefined string variables return an empty
string.
DIM Name(...) defines
array. Name is one or two
characters.
Only A()
allowed to
access A-
Z.
DIM
B(...)-Z()
define
arrays.
A() is
reserved.
DIM Name(...) defines array. Name is one or two characters.
PC-1421 has special arrays CFI and NFI with index 0..19.
DIM Name(...) defines array.
Array names follow the rules of numeric
variables.
Single or double precision
arrays are independent
Single and double precision arrays are
independent from each other.
DIM Name$(...)*L creates
string array. See right for
details.
Only A$()
allowed to
access A$-
Z$.
DIM Name$(...)*L creates string array with maximum string length L which defaults to 16.
Names follow the rules of numeric arrays+$.
Length can be an expression. Maximum string length is 80.
DIM Name$(...) defines string array.
String array names follow the rules of string
variables.
String length is dynamic up to 254
characters.
Two dimensions up to 255.
Dimensions can be
expressions.
Number and size of dimensions is only
limited by memory. Dimensions can be
expressions.
@(1) to @(26) address
variables A-Z.
A(1) to A(26) or A$(1) to A$(26) can be used to address variables A-Z if they contain the proper data type. Assigning a
value to higher index values reserves additional space.
DIM A(...) or A$(...) disables this overlap except on PC-121x and PC-1248 which reserve A(...).
PC-1421: ERASE FIN clears financial variables, ERASE deletes selected arrays.
All others: You cannot erase a single array or variable.
Comentarios a estos manuales