HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Noob Data Type Question...

 
Christopher Waddell
Occasional Advisor

Noob Data Type Question...


signed longword scale 0

That can handle 9 digits, right??

Thanx In Advance,
->Christopher
5 REPLIES
John Gillings
Honored Contributor

Re: Noob Data Type Question...

Christopher,
"signed longword scale 0" is really just a signed 32 bit integer. So the range is

-2147483648 to 2147483647

which covers all positive and negative 9 digit numbers.
A crucible of informative mistakes

Re: Noob Data Type Question...

Good Morning Christopher...

As Mr. Gillings pointed out, the "signed longword scale 0" can handle positive and negative approximately 2-billion "decimal numbers", which is into the tenth digit. Hopefully, your referral to "9 digits" is also in Decimal-Radix, and not "Hex-Radix", which is the default-radix for a "longword". Most utilities and languages running on OVMS use decimal for the default radix, so you should be covered here.

But, if you need 9-digit precision for hexadecimal computations, then you will need to used quadwords. Hope this helps..

Thanx,
whynot3k
Christopher Waddell
Occasional Advisor

Re: Noob Data Type Question...

Thanx for your responses.

This number will not be used in any calculations it's an ID like an SSN.

It's just we're about to go over 999999.

I do appreciate your help.

->Christopher
Christopher Waddell
Occasional Advisor

Re: Noob Data Type Question...

Ooooops!

That should be 99999999.

->C.
Antoniov.
Honored Contributor

Re: Noob Data Type Question...

Chris,
welcome to vms forum.

May I hint you assigning some points to fellows helped you?

Cheers
Antonio Vigliotti
Antonio Maria Vigliotti