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

Home » Public Forums » archive » variable types
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
variable types [message #11019] Thu, 19 February 1998 00:00
David R. Klassen is currently offline  David R. Klassen
Messages: 14
Registered: December 1996
Junior Member
I'm in the process of writing a quick and dirty program to
go through a text file and grab the lines that are ordered
pairs of numbers and plot them. The problem comes with the
fact that some of these data files have a line or two of
text at the top.

When I read each line of the file I parse it along white-spaces
or tabs uisng the PARTS function (no problem so far). Then I
assign the first two parts to my x and y arrays. The problem
is that if the line read was a line of text, the parts can not
be converted from string type to float type (it turns out that
a string ' 13.456' *can* be turned into a float=13.456).

My question: is there a way to test the variable type before
I make the assignments?

--
David R. Klassen
Department of Astronomy
Center for Radiophysics and Space Research
404 Space Sciences Building
Cornell University
Ithaca NY 14853
phone: 607-255-6910
fax: 607-255-9002
http://astrosun.tn.cornell.edu/staff/klassen/klassen.html
klassen@marswatch.tn.cornell.edu
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Computing Speed
Next Topic: Making money (was: Computing Speed)

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

Current Time: Fri Oct 10 16:24:54 PDT 2025

Total time taken to generate the page: 0.24201 seconds