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

Home » Public Forums » archive » Q: About reading files into an array without knowing the size.
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: Q: About reading files into an array without knowing the size. [message #5321 is a reply to message #5205] Sat, 11 November 1995 00:00 Go to previous messageGo to previous message
chris is currently offline  chris
Messages: 22
Registered: October 1994
Junior Member
I often spawn the unix wc (word count) program to asses the
length of an ascii file. In fact I (and probably others as well)
have written a simple routine which employs "getwrd.pro" from
the JHUALP library:

function n_lines,file

;this will tell you how many lines a text file is
; Usage: N = n_lines("myfile.dat")

spawn,'wc '+ file, output ;unix word count command
return,getwrd(output(0),0)
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 3D velocity field representation
Next Topic: How can I add parameter to curvefit?

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

Current Time: Wed Oct 08 19:26:41 PDT 2025

Total time taken to generate the page: 0.00418 seconds