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

Home » Public Forums » archive » Re: Reading * symbol out of a string
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: Reading * symbol out of a string [message #66419 is a reply to message #66418] Mon, 11 May 2009 09:17 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article
<39c8864a-a3f9-4022-8841-82ba2fb23aa2@z5g2000vba.googlegroups.com>,
fugu <daniel.hawellek@gmail.com> wrote:

> Dear all,
>
> I have a string x
>
> X STRING = '*280 948 80 0'
>
> which I am trying to read into variables:
>
> READS, x, stage, lat, lon, wind, press, format =
> '(A1,I3,1x,I3,1x,I3,1x,I4)'
>
> This returns % Type conversion error: Unable to convert given STRING
> to Float.
>
> and the problem seems to be the (ASCII decimal 42 mapped -) * symbol.
>
> I have tried to read it into various formats (replace A by I or F for
> instance), but none works.
>
> Has anyone got an idea, why that is and how to work around it?
>
> Many thanks!
>
> Daniel

Did you do

x = ''

to ensure that it was a string before trying to read into it?

Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Can IDL be used to generate microsoft word documents automatically?
Next Topic: Spline based ROIs

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

Current Time: Sat Oct 11 03:39:18 PDT 2025

Total time taken to generate the page: 0.95894 seconds