
BASIC comparison sheet Functions Page 11
Vendor
Model
Syntax remarks
Precision of mathematical functions
Strings
Concatenation
Substrings
Length
ASCII to string
String to ASCII
Number to string
String to number
Expression evaluation
Search substring
Case conversion
Repeat string
Numbers
Absolute Value
Sign
Integer part
Fractional part
Largest integer below or equal
Smallest integer above or equal
PI
Other constants
Maximum
Minimum
Arithmetic
Implied multiplication AB=A*B
Integer division
Modulo
Remainder
Reduction
Percentage
Logic
Comparisons
Result of 1=1
Logical operators
Number of bits
Priority of NOT
Conversions
HEX format for integers
HEX display
Deg/min/sec to decimal
Number to deg/min/sec
Degrees to radians
Radians to degrees
Polar to rectangular
Rectangular to polar
More conversions
Round to d decimal places.
Examples round to cents.
Workarounds for positive x only!
Power x
y
Functions
Sharp
PC-1500A PC-1403 PC-1280 PC-1475 PC-G850
Parentheses around arguments of many functions are optional. PC-121x allows missing ')'
Default precision Selectable Single precision Selectable
string1 + string2
N/A
string1 + string2
LEN string LEN string
CHR$ code CHR$ code
ASC char ASC char
STR$ expr STR$ expression
VAL string, evaluation stops at first illegal character.
N/A
N/A N/A
ABS x
SGN x
SGN x * INT ABS x
SGN x * (ABS x - INT ABS x)
INT x
-INT -x
Use INT (see left)
PI, PI#
PI N/A PI PI
N/A
(a > b) * a + (a <= b) * b -(a > b) * a - (a <= b) * b
(a > b) * b + (a <= b) * a -(a > b) * b - (a <= b) * a
No Yes, high priority No
x ^ y
INT(a / b)
a – b * INT(a / b)
SGN a * (ABS a – ABS b * INT ABS(a / b))
N/A
a * p / 100, short form for PC-1211/1248: AP/E2
1 -1
NOT, AND, OR 1-, *, + NOT, AND, OR NOT, AND, OR, XOR (PC-E220 lacks XOR)
16, signed logical only 16, signed
High, need () N/A High, expressions need parentheses.
&0-&FFFF N/A &0-&FFFF
&0-&FFFFFFFF
&H0-&HFFFFFFFF
&H0-&HFFFFFFFF
DECI FFFFFFFF N/A DECI FFFFFFFF &FF..., DECI FFFFFFFF
N/A N/A N/A
DEG(d.mmss), DMS values are formatted as a single number
DMS(d) returns a number formatted as d.mmss
d / 180 * PI
r / PI * 180
Workaround see left
N/A
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
LEFT$(s,l)
RIGHT$(s,l)
MID$(s,st,l)
LEFT$(string,length)
RIGHT$(string$,length)
MID$(string,start,length)
VAL string, stops
at first illegal
character.
EVAL string
AER n(args)
INT(x * 10^d + 0.5) / 10^d,
INT(X*100+0.5)/100
PC-1421: see PC-1403.
USING
”##.##”
MDF X
USING "###.##" sets precision for
MDF(X,threshold), threshold defaults to 4.
Display only: USING "###.##" sets display format, PRINT USING "###.##";X sets format and outputs X.
USING is persistent, even if used together with PRINT.
PRINT USING works for
current line only.
Symbol π
PI, PI#, π#
<, <=, >, >=, =, <>
PC-121x can compare strings with = only.
HEX n, n<2
32
(display only)
HEX$(n), n<2
32
, var. l.
HEX n (display only)
HEX$(n), n<2
32
, variable length
HEX n (display only, not PC-G850)
x=r * COS θ, y=r * SIN θ REC(r,θ) ->Y,Z REC(r,θ) -> x=Y, y=Z
r=√(x*x + y*y)
θ=ACS(x / r)
POL(x,y) -> Y,Z
See PC-1280.
POL(x,y) -> r=Y, θ=Z
Both functions return variable Y.
Comentarios a estos manuales