Re: Breaking down a large hex number.

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Thu, 13 Jul 2000 17:26:15 -0500, RedWordSmith
<redwordsmith at NIC.DREAMHOST.COM> wrote:

Hi. :)

>I have a large number expressed in hexadecimal in the format of:
>
>blue = #1111222233333344444455677777789ABBBBBBCDEFF11
>--Euphoria informs me this is about 1e+053

If this is actual code from your program, it only runs if you define 'blue'
to be an atom. Even then you'll only have 12-13 hex digits of accuracy, so
everything after the 3's in your example would be garbled even if
sprintf("%x",blue) actually worked with numbers this big! sad

I get the feeling you've already figured most of this out though...

The rest of your message indicates that you're getting the number from some
outside source (Netscape? Web Page?)
How exactly are you reading it into your program?
Inputting from a text file, 'gets()' will get a string to begin with, so
you wouldn't need sprintf(), and if you're typing the number in by hand,
you may as well add the brackets by hand or type it in as a string... blink

HTH,
Carl

--
no .sig

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu