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

Home » Public Forums » archive » Re: Problem using ReadS to read a long string
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
Re: Problem using ReadS to read a long string [message #75954] Wed, 04 May 2011 16:38
Evan is currently offline  Evan
Messages: 2
Registered: May 2011
Junior Member
On May 4, 5:07 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On May 4, 8:01 pm, Evan <emt...@gmail.com> wrote:
>
>
>
>> I've spent quite a while on this small problem to no avail. I have a
>> long formatted string that contains data that I need to access.
>> Unfortunately, when I try to format it with ReadS, I always get an
>> "end of input data encountered" error.
>
>> The strings look like this:
>
>> pg0953_ 0.36250 Lya   -28  34108673   1108673   1   11  4   11  2
>> 65.7 13.0   73.4 13.9 e140m  18.8  6.2 13.305  0.101 -0.073 13.324
>> 0.078 -0.078 f0
>
>> And I'm using the following line of code to read it:
>
>> reads,input,root,z,ion,vthing,vaod,dvaod,vfit,dvfit,baod,dba od,bfit,dbfit,w­aod,dwaod,
>> $
>
>> wfit,dwfit,chan,wmin,snres,lnaod,dlnpaod,dlnmaod,lnfit,dlnpf it,dlnmfit,flag­,
>> $
>>                 format='(A,F,A,I,I,I,I,I,I,I,I,I,F,F,F,F,A,F,F,F,F,F,F,F,F,A )'
>
>> I've never had to use ReadS before, so I'm wondering if I'm making
>> some really simple mistake about how it works. Any ideas?
>
> The problem is the "A" at the beginning. The string read into the
> first variable will gobble up everything, leaving nothing for the rest.



Thanks so much; that solved it!
Re: Problem using ReadS to read a long string [message #75955 is a reply to message #75954] Wed, 04 May 2011 16:07 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On May 4, 8:01 pm, Evan <emt...@gmail.com> wrote:
> I've spent quite a while on this small problem to no avail. I have a
> long formatted string that contains data that I need to access.
> Unfortunately, when I try to format it with ReadS, I always get an
> "end of input data encountered" error.
>
> The strings look like this:
>
> pg0953_ 0.36250 Lya   -28  34108673   1108673   1   11  4   11  2
> 65.7 13.0   73.4 13.9 e140m  18.8  6.2 13.305  0.101 -0.073 13.324
> 0.078 -0.078 f0
>
> And I'm using the following line of code to read it:
>
> reads,input,root,z,ion,vthing,vaod,dvaod,vfit,dvfit,baod,dba od,bfit,dbfit,w­aod,dwaod,
> $
>
> wfit,dwfit,chan,wmin,snres,lnaod,dlnpaod,dlnmaod,lnfit,dlnpf it,dlnmfit,flag­,
> $
>                 format='(A,F,A,I,I,I,I,I,I,I,I,I,F,F,F,F,A,F,F,F,F,F,F,F,F,A )'
>
> I've never had to use ReadS before, so I'm wondering if I'm making
> some really simple mistake about how it works. Any ideas?

The problem is the "A" at the beginning. The string read into the
first variable will gobble up everything, leaving nothing for the rest.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Problem using ReadS to read a long string
Next Topic: Re: Alpha blending with object graphics - different color palettes do not work

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

Current Time: Fri Oct 10 01:53:53 PDT 2025

Total time taken to generate the page: 1.76001 seconds