home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Press 1997 July
/
Sezamfile97_1.iso
/
msdos
/
misc
/
sm30a.a03
/
TYPE.KEY
< prev
next >
Wrap
Text File
|
1993-11-07
|
825b
|
30 lines
* type internal
type(x) gives the type of x. Its value is a string.
e.g.
------------------------------
x type(x)
1 "integer"
1.1 "real"
2/3 "ratio"
1+i "complex"
sin(x) "sin()"
[1,2] "[]"
a "variable"
a+b "+"
a*b "*"
a^b "^"
"a" "string"
a=b "="
a==b "=="
a>b ">"
a>=b ">="
a<b "<"
a<=b "<="
a<>b "<>"
a,b ","
---------------------------------
You also can test x, e.g. if x is type of real number, by
type(x)=="real".