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

Home » Public Forums » archive » Re: Why doesn't this work?
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: Why doesn't this work? [message #7833 is a reply to message #7806] Thu, 09 January 1997 00:00 Go to previous messageGo to previous message
Tim Abbott is currently offline  Tim Abbott
Messages: 4
Registered: January 1997
Junior Member
Oops, as Joe Gurman points out, if all the numbers are 3 digits long
the fix is to use format='(4(1X,I3))'. Unfortunately, the numbers
will not always be 3 digits long...


Tim Abbott wrote:
>
> Can anyone tell me why this doesn't work?
>
> I need to extract the four numbers from the string "[123:456,246:135]"
>
> Here is the code segment I'm trying to use:
> IDL> str = "[123:456,246:135]"
> IDL> reads,str,x1,x2,x3,x4,format='(4(1X,I0))'
> % Unable to apply format code I to input: "]".
> % Execution halted at: $MAIN$
> IDL> print,x1,x2,x3
> 123.000 246.000 0.00000
> IDL> print,x1,x2,x3,x4
> % PRINT: Variable is undefined: X4.
> % Execution halted at: $MAIN$
>
> Any ideas?
>
> --
> Timothy M. C. Abbott
> http://www.cfht.hawaii.edu/~tmca/tmca.html

--
Timothy M. C. Abbott
http://www.cfht.hawaii.edu/~tmca/tmca.html
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: polar stereographic contour plot.
Next Topic: Q: Selection of specific plot regions

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

Current Time: Sat Oct 11 05:18:59 PDT 2025

Total time taken to generate the page: 0.87879 seconds