HP Forums
GETBITS syntax - 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: GETBITS syntax (/thread-6236.html)



GETBITS syntax - salvomic - 05-12-2016 05:56 PM

I wonder why GETBITS(#255d) it's ok but GETBITS(255) not (error: invalid input).
It could be interpreted "as default" as decimal...
Or not?

Salvo


RE: GETBITS syntax - informach - 05-12-2016 09:25 PM

Hi!, salvomic:

Syntax: GETBITS(#integer) Returns the number, of bits, used by integer, expressed, in the default base.
Example: GETBITS(#22122) returns #20h or 32.

Kind Regards.
informach.


RE: GETBITS syntax - salvomic - 05-12-2016 09:34 PM

thank you, I know it...
I mean: "why is the # mandatory?"


RE: GETBITS syntax - DrD - 05-12-2016 09:49 PM

Hi Salvo,

The syntax for this requires the integer base in order to determine the encoding. It uses the default base if not specified, but in any event, that means you would need to use the integer syntax (#number, o, d, h).

-Dale-


RE: GETBITS syntax - salvomic - 05-12-2016 09:51 PM

(05-12-2016 09:49 PM)DrD Wrote:  Hi Salvo,

The syntax for this requires the integer base in order to determine the encoding. It uses the default base if not specified, but in any event, that means you would need to use the integer syntax (#number, o, d, h).

-Dale-

thank you Dale,
now it is very clear for me.

Salvo