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

Home » Public Forums » archive » Re: [Q]: reading hexadecimal numbers from text files
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: [Q]: reading hexadecimal numbers from text files [message #24511] Mon, 02 April 2001 19:00 Go to previous message
intrigue is currently offline  intrigue
Messages: 2
Registered: April 2001
Junior Member
In article <MPG.1532c233dd7e5ef6989dbc@news.frii.com>, davidf@dfanning.com
(David Fanning) wrote:

> David Fanning (davidf@dfanning.com) writes:
>
>> I have no idea how to read 'CS' into a short integer, but
>> hexadecimal values are quite straightforward.
>
> Well, "no idea" is perhaps too strong. You can turn
> the string "CS" into a integer value like this:
>
> IDL> variable = "CS"
> IDL> var = Fix(Byte(variable), 0)
> IDL> Print, var
> 21315
>
> I'm just not sure that's what you really wanted to do. :-(
>

Yep, thats it. Didn't realise I could do that with 'Fix'. Might try
reading the manual next time ;-)

Thanks muchly,
erin
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: [Q]: reading hexadecimal numbers from text files
Next Topic: Re: IDL vs. Matlab

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

Current Time: Wed Oct 08 13:31:34 PDT 2025

Total time taken to generate the page: 0.00441 seconds