comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: convert decimal -> hexadecimal
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: convert decimal -> hexadecimal [message #52027 is a reply to message #52025] Thu, 21 December 2006 09:23 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
Laurens wrote:
> I have a decimal variable (aka nr = 84), which needs to be converted to
> a hexadecimal representation of it (aka nr_hex = 54).
> I found a solution with reads to convert from hexadecimal to decimal but
> I need it the other way around...
>
> Any ideas?

How about the Z format:

IDL> nr = 84
IDL> print, nr, format='(Z)'
54
IDL> nr_hex = string(nr, format='(Z)')
IDL> help, nr_hex
NR_HEX STRING = ' 54'

Mike
--
www.michaelgalloy.com
[Message index]
 
Read Message
Read Message
Previous Topic: How to IDL to XML using XMLffDOMDocument
Next Topic: Image segmentation programs in IDL?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 18:38:33 PDT 2025

Total time taken to generate the page: 1.51770 seconds