[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Q]: reading hexadecimal numbers from text files
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