Hi Everyone!
I'm writing a little program on the HP Prime and I'm using the INPUT command, so I need to know what the object types are:
for example:
Real number: (object type code?)
String: (object type code?)
integer: (object type code?)
... etc.
where can I find these codes? help please!
(03-19-2015 06:50 PM)Spybot Wrote: [ -> ]
Hi Everyone!
I'm writing a little program on the HP Prime and I'm using the INPUT command, so I need to know what the object types are:
for example:
Real number: (object type code?)
String: (object type code?)
integer: (object type code?)
... etc.
where can I find these codes? help please!
For use see in the help for INPUT (Toolbox - me -> Catlg, search input, then press Help). (Sure you had already done it)...
Then see in
this web page and search TYPE.
The types are:
0: Real
1: Integer
2: String
3: Complex
4: Matrix
5: Error
6: List
8: Function
9: Unit
14.?: cas object. the fractional part is the cas type
(03-19-2015 06:50 PM)Spybot Wrote: [ -> ]
Hi Everyone!
I'm writing a little program on the HP Prime and I'm using the INPUT command, so I need to know what the object types are:
for example:
Real number: (object type code?)
String: (object type code?)
integer: (object type code?)
... etc.
where can I find these codes? help please!
Just use the Prime to find out, e.g. in Home, TYPE(5) [Enter], TYPE(#4), TYPE("abc"), TYPE(5+3i), TYPE({1,2,3}) will give you those types (0, 1, 2, 3 and 6 for these examples)
Edit: Clarified this is in Home
Hi, Salvomic!
Hey... Thanks a lot !
That was really helpful.
Hi Bob!
That is another approach, nice and clear!
Thank you!
(03-19-2015 07:26 PM)Spybot Wrote: [ -> ]OK.... Is this normal?
they are real numbers, so type=0
{1,2,3} is a list -> type = 6 and so on...
hp50g used to notice the difference between these.
Than You Salvomic!
(03-19-2015 07:31 PM)Spybot Wrote: [ -> ]hp50g used to notice the difference between these, but now I can see clearly the way HP Prime works.
Than You Salvomic!
TYPE() and type() are different
you're trying in Home...
In CAS you get:
type(5) = DOM_INT
type(5.9) = DOM_FLOAT
type(⅔) = DOM_RAT
but TYPE(5.9) = 0 also, and so on...