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

Home » Public Forums » archive » handling numbers
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: handling numbers [message #33244 is a reply to message #33179] Sun, 15 December 2002 13:13 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
<wmc@bas.ac.uk> wrote in message news:3dfa6197@news.nwl.ac.uk...
> Richard Adams <rja46@cam.ac.uk> wrote:
>>> 000237.9
>>>
>>> and I would like to write them in this form:
>>> 00 02 37.9
>
>> a = '000235.8'
>> print, (STREGEX(a, '(..)(..)(....)', /SUBEXPR, /extract))[1:*]
>> 00 02 35.8
>
> In other words, use perl...

a = '000235.8'
b = byte(a)
print, string(b[0:1]), ' ', string(b[2:3]), ' ', string(b[4:*])

Eat your heart out, Perl...

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Read Total lines in an ASCII file
Next Topic: Large widget identifiers

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

Current Time: Wed Dec 03 06:53:57 PST 2025

Total time taken to generate the page: 1.67914 seconds