[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q]: reading hexadecimal numbers from text files

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

I'm just not sure that's what you really wanted to do. :-(



David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155