[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Q]: reading hexadecimal numbers from text files
In article <MPG.firstname.lastname@example.org>, email@example.com
(David Fanning) wrote:
> David Fanning (firstname.lastname@example.org) 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
> 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 ;-)