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

Home » Public Forums » archive » Why doesn't this work?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Why doesn't this work? [message #7836] Thu, 09 January 1997 00:00
Tim Abbott is currently offline  Tim Abbott
Messages: 4
Registered: January 1997
Junior Member
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: test
Next Topic: Q: Use of variables with FORMAT

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

Current Time: Wed Oct 08 20:01:29 PDT 2025

Total time taken to generate the page: 0.00505 seconds