Re: printing hexadecimal [message #51008] |
Wed, 01 November 2006 06:57  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Robert Moss, PhD writes:
> Being the lazy sort, I'm wondering if there is a built-in or user
> routine around that will accept an array of bytes and output them (to
> screen or file) as hexidecimal out there. I could write one, but as I
> said, I'd prefer to have someone else to the grunt work :)
Uh, I think IDL has already thought of this:
IDL> var = bindgen(20)
IDL> Print, var, Format='(20(z2.2,x))'
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: printing hexadecimal [message #51084 is a reply to message #51008] |
Thu, 02 November 2006 08:21  |
Robert Moss, PhD
Messages: 29 Registered: November 2006
|
Junior Member |
|
|
Well, there ya go. I knew someone would do the grunt work for me. And
so cheerfully too. I would have simply said "RTFM".
r
David Fanning wrote:
> Robert Moss, PhD writes:
>
>> Being the lazy sort, I'm wondering if there is a built-in or user
>> routine around that will accept an array of bytes and output them (to
>> screen or file) as hexidecimal out there. I could write one, but as I
>> said, I'd prefer to have someone else to the grunt work :)
>
> Uh, I think IDL has already thought of this:
>
> IDL> var = bindgen(20)
> IDL> Print, var, Format='(20(z2.2,x))'
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|