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

Home » Public Forums » archive » Re: counting rows
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: counting rows [message #53342] Mon, 09 April 2007 12:12
Christopher Thom is currently offline  Christopher Thom
Messages: 66
Registered: October 2006
Member
Quoth David Fanning:

> shishir.czt@gmail.com writes:
>
>> i am fasing problem in reading a file . the file is a text file . i
>> know the number of columns ,but wana compute the number of rows ,
>> currently i am using EOF function to do that in a loop but some how it
>> is not working .
>> tell me what can i do to make it working.
>
> Use FILE_LINES to determine the number of rows in the file.

Since you know the number of columns, you could also use "readcol.pro" in
the idlastro library, to read your data. It will read up to 25 columns of
data of a specified data type.

http://idlastro.gsfc.nasa.gov/ftp/pro/misc/readcol.pro

cheers
chris
Re: counting rows [message #53348 is a reply to message #53342] Mon, 09 April 2007 06:45 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
shishir.czt@gmail.com writes:

> i am fasing problem in reading a file . the file is a text file . i
> know the number of columns ,but wana compute the number of rows ,
> currently i am using EOF function to do that in a loop but some how it
> is not working .
> tell me what can i do to make it working.

Use FILE_LINES to determine the number of rows in the file.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: manipulating structures
Next Topic: Widget Linking

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

Current Time: Fri Oct 10 08:05:42 PDT 2025

Total time taken to generate the page: 1.35949 seconds