
BASIC comparison sheet Functions Page 8
Functions
Vendor Casio
Model FX-702 PB-700 PB-770 FX-750P VX-4 Z-1GR FP-200
Syntax remarks Parentheses around arguments of many functions are optional.
Precision of mathematical functions Default precision Same as argument.
Strings
Concatenation string1 + string2
Substrings
MID(start,length) MID is obsolete
N/A
Length LEN(string variable) LEN(string)
ASCII to string
N/A, no ASCII code
CHR$(code)
String to ASCII ASC(char)
Number to string N/A STR$(expression)
String to number N/A VAL(string variable) VAL(string), evaluation stops at first illegal character.
Expression evaluation N/A N/A VALF(string) N/A
Search substring
N/ACase conversion
Repeat string
Numbers
Absolute Value ABS x ABS(x)
Sign SGN x SGN(x)
Integer part SGN x * INT ABS x FIX(x)
Fractional part FRAC x FRAC(x)
Largest integer below or equal INT x INT(x)
Smallest integer above or equal -INT -x -INT(-x)
N/A RND is an obsolete alias. N/A
Display only: SET Fd, SET Ed set display precision.
PI PI
4*ATN(1) in ANGLE 1
4*ATN(1#) in ANGLE 1
Other constants N/A
Maximum
N/A
Minimum
Arithmetic
Implied multiplication AB=A*B No
x ^ y
Integer division INT(a / b)
Modulo a – b * INT(a / b)
Remainder SGN a * (ABS a – ABS b * INT ABS(a / b)) a MOD b
Reduction N/A
Percentage a * p / 100
Logic
Comparisons <, <=, =<, >, >=, =>, =, <>, ><
Result of 1=1 Comparisons cannot appear outside IF statement -1, can only be used inside a program, not in direct mode. -1
Logical operators
N/A
NOT, AND, OR, XOR NOT, AND, OR, XOR, EQV, IMP
Number of bits 16, signed
Priority of NOT Low
Conversions
HEX format for integers
N/A
&H0-&HFFFF
N/AHEX display
Deg/min/sec to decimal
N/A
Number to deg/min/sec DMS (display) DMS$(x)
Degrees to radians d / 180 * PI d / 180 * PI (define PI)
Radians to degrees r / PI * 180 r / PI * 180 (define PI)
Polar to rectangular
Workaround see left Workaround see left
Rectangular to polar
More conversions N/A
PB-100
PB-300
FX-700P
FX-710P
PB-220
FX-720P
FX-730P
FX-770P
FX-785P
FX-790P
FX-795P
FX-850P
FX-880P
PB-1000
PB-2000C/AI-1000
with BASIC ROM
OM-53B
All function arguments need
parentheses.
LEFT$(string,length)
RIGHT$(string$,length)
MID$(string,start,length), length defaults to rest of string.
MID$(start,length)
Works only with the special string variable $.
Length defaults to rest of string.
795P: $="expr"
MODE 20,V
Round to d decimal places.
Examples round to cents.
Workarounds for positive x only!
RND(x,-d – 1), RND(X,-3)
ROUND(x,-d – 1), ROUND(X,-3)
Display only: PRINT USING "###.##";X
Works for current line only.
Display only: SET Fd, SET Ed set
display precision
Display only: PRINT USING "###.##";X
Works for current line only.
Symbol π
Power x
y
x y (special symbol)↑
<, ≤, >, ≥, =, ≠ (special symbols)
Low. Manual recommends
parentheses.
HEX$(n), n<2
16
, result is padded with "0" to four hex digits.
DEG(d,m,s) DEG(d,m,s)
d / 180 * π
r / π * 180
PRC r,θ -> x=X,y=Y x=r * COS θ, y=r * SIN θ REC(r,θ) -> X,Y REC(r,θ) -> x=X, y=Y
RPC x,y -> r=X,θ=Y
Commands
r=SQR(x*x + y*y)
θ=ACS(x / r)
POL(x,y) -> X,Y
See FX-850P.
POL(x,y) -> r=X, θ=Y
Both functions return variable X.
CDBL, CSNG convert between
double and single precision.
Comentarios a estos manuales