Re: hexadecimal from byte?

From: Andrea Hahmann <hahmann_at_nyahnyahspammersnyahnyah>
Date: Thu, 17 Jan 2008 16:17:40 -0700

Hi Adam

What you suggests just gives be the number 2 as a string "2". What I
need is the hexadecimal representation of the number 2. For example,
the number 123 is "01111011". In my case each of these "0/1" represent
when a given test has been passed or not. That is the information I
need. Any suggestions?

Thanks
Andrea

asphilli_at_ucar.edu wrote:
> Hi Andrea,
>
> The conversion is done automatically behind-the-scenes in most cases. For
> instance:
>
> a = 2
> b = "Quantity needed: "+a
> printVarSummary(b)
> print(b)
>
> or
> a = 2
> b = "Hello"
> b = a
> print(b)
>
> Adam
>
>
>> Reading the documentation, I have found that I can convert an
>> hexadecimal number to integer using the function "stringtointeger". Is
>> there a function to do the conversion back? If not, perhaps somebody
>> has already written such a thing?
>>
>> Thanks,
>> Andrea
>>
>> --
>> ----------------------------------------------------------------
>> Andrea N. Hahmann, Ph.D.
>> Research Applications Laboratory
>> Natl. Center for Atmospheric Research Phone: 1-303-497-8383
>> PO BOX 3000 Fax: 1-303-497-8401
>> Boulder, CO 80301 hahmann_at_ucar.edu
>> ----------------------------------------------------------------
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

-- 
----------------------------------------------------------------
Andrea N. Hahmann, Ph.D.
Research Applications Laboratory
Natl. Center for Atmospheric Research      Phone: 1-303-497-8383
PO BOX 3000                                Fax:   1-303-497-8401
Boulder, CO 80301                          hahmann_at_ucar.edu
----------------------------------------------------------------
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jan 17 2008 - 16:17:40 MST

This archive was generated by hypermail 2.2.0 : Wed Jan 23 2008 - 14:19:33 MST