Re: Hex to decimal??? [message #8583] |
Tue, 01 April 1997 00:00 |
sigut
Messages: 12 Registered: February 1994
|
Junior Member |
|
|
In article <5hbchs$gb7@maze.dpo.uab.edu> rkj@dukebar.crml.uab.edu
(R. Kyle Justice) writes:
: >For example, I would like to convert "'0E'X" to its decimal
: >equivalent.
: >FIX works fine for strings containing decimals (i.e '14')
: >but not hex strings.
WAVE> print,fix('0e'x)
14
WAVE>
Looks all right to me! (Wave 6)
: You might try READS.
I am using PV-Wave. READS must be an IDL function. What exactly
does it do?
READS reads the input from a string instead of a file:
READS, string, var1, var2 instead of READF, unit, var1, var2
This way you have a possibility to use the usual READing procedures
to interpret any strings that pass by.
Regards, George
--
------------------------------------------------------------ ------------------
George M.Sigut, ETH Informatikdienste, Anwenderunterstuetzung, CH-8092 Zurich
Swiss Federal Institute of Technology, Computing Services, User Support
email: sigut@awu.id.ethz.ch Phone: +41 1 632 5763 Fax: +41 1 632 1312
>>>>>>>>> in case of email problems send the mail to "sigut@acm.org" <<<<<<<<<
------------------------------------------------------------ ------------------
|
|
|
Re: Hex to decimal??? [message #8609 is a reply to message #8583] |
Wed, 26 March 1997 00:00  |
rkj
Messages: 66 Registered: February 1996
|
Member |
|
|
William Thompson (thompson@orpheus.nascom.nasa.gov) wrote:
: rkj@dukebar.crml.uab.edu (R. Kyle Justice) writes:
: >Is there a way to convert a string containing a hex number to
: >an integer?
: >For example, I would like to convert "'0E'X" to its decimal
: >equivalent.
: >FIX works fine for strings containing decimals (i.e '14')
: >but not hex strings.
: You might try READS.
: Bill Thompson
I am using PV-Wave. READS must be an IDL function. What exactly
does it do?
Kyle J.
|
|
|
Re: Hex to decimal??? [message #8612 is a reply to message #8609] |
Tue, 25 March 1997 00:00  |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
rkj@dukebar.crml.uab.edu (R. Kyle Justice) writes:
> Is there a way to convert a string containing a hex number to
> an integer?
> For example, I would like to convert "'0E'X" to its decimal
> equivalent.
> FIX works fine for strings containing decimals (i.e '14')
> but not hex strings.
You might try READS.
Bill Thompson
|
|
|