HP Forums
HP Prime object types for INPUT command (SOLVED) - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: HP Prime object types for INPUT command (SOLVED) (/thread-3435.html)



HP Prime object types for INPUT command (SOLVED) - Spybot - 03-19-2015 06:50 PM


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!


RE: HP Prime object types for INPUT command - salvomic - 03-19-2015 06:57 PM

(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


RE: HP Prime object types for INPUT command - rprosperi - 03-19-2015 07:00 PM

(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


RE: HP Prime object types for INPUT command - Spybot - 03-19-2015 07:04 PM

Hi, Salvomic!

Hey... Thanks a lot !

That was really helpful.


RE: HP Prime object types for INPUT command - salvomic - 03-19-2015 07:05 PM

(03-19-2015 07:04 PM)Spybot Wrote:  Hi, Salvomic!
Hey... Thanks a lot !
That was really helpful.

you're welcome! Smile


RE: HP Prime object types for INPUT command - Spybot - 03-19-2015 07:06 PM

Hi Bob!

That is another approach, nice and clear!

Thank you!


RE: HP Prime object types for INPUT command - Spybot - 03-19-2015 07:26 PM

_______


RE: HP Prime object types for INPUT command - salvomic - 03-19-2015 07:28 PM

(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...


RE: HP Prime object types for INPUT command - Spybot - 03-19-2015 07:31 PM

hp50g used to notice the difference between these.

Than You Salvomic!


RE: HP Prime object types for INPUT command - salvomic - 03-19-2015 07:36 PM

(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...