Post Reply 
HP Prime object types for INPUT command (SOLVED)
03-19-2015, 06:50 PM (This post was last modified: 03-21-2015 06:43 AM by Spybot.)
Post: #1
HP Prime object types for INPUT command (SOLVED)

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!

Spybot.
Find all posts by this user
Quote this message in a reply
03-19-2015, 06:57 PM (This post was last modified: 03-19-2015 06:59 PM by salvomic.)
Post: #2
RE: HP Prime object types for INPUT command
(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

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
03-19-2015, 07:00 PM (This post was last modified: 03-19-2015 07:02 PM by rprosperi.)
Post: #3
RE: HP Prime object types for INPUT command
(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

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
03-19-2015, 07:04 PM
Post: #4
RE: HP Prime object types for INPUT command
Hi, Salvomic!

Hey... Thanks a lot !

That was really helpful.

Spybot.
Find all posts by this user
Quote this message in a reply
03-19-2015, 07:05 PM
Post: #5
RE: HP Prime object types for INPUT command
(03-19-2015 07:04 PM)Spybot Wrote:  Hi, Salvomic!
Hey... Thanks a lot !
That was really helpful.

you're welcome! Smile

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
03-19-2015, 07:06 PM
Post: #6
RE: HP Prime object types for INPUT command
Hi Bob!

That is another approach, nice and clear!

Thank you!

Spybot.
Find all posts by this user
Quote this message in a reply
03-19-2015, 07:26 PM (This post was last modified: 11-30-2022 08:28 PM by Spybot.)
Post: #7
RE: HP Prime object types for INPUT command
_______

Spybot.
Find all posts by this user
Quote this message in a reply
03-19-2015, 07:28 PM
Post: #8
RE: HP Prime object types for INPUT command
(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...

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
03-19-2015, 07:31 PM (This post was last modified: 04-13-2015 04:06 PM by Spybot.)
Post: #9
RE: HP Prime object types for INPUT command
hp50g used to notice the difference between these.

Than You Salvomic!

Spybot.
Find all posts by this user
Quote this message in a reply
03-19-2015, 07:36 PM
Post: #10
RE: HP Prime object types for INPUT command
(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...

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 3 Guest(s)