[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


NUMLINES() Source code in numlines.pro

NUMLINES()

Name
     NUMLINES()
Purpose
     Return the number of lines in a file
     This procedures became mostly obsolete in V5.6 with the introduction of
     the FILE_LINES() procedure
Calling Sequence
     nl = NUMLINES( filename )
Input Parameters
     filename = name of file, scalar string
Output Parameters
     nl = number of lines in the file, scalar longword
          Set to -1 if the number of lines could not be determined
Procedure
     If Unix then spawn to wc; otherwise read 1 line at a time and count
     Call FILE_LINES() if V5.6 or later
Procedures Used
     EXPAND_TILDE(), SPEC_DIR()
Revision History
     W. Landsman                              February 1996
     Use /bin/sh shell with wc under Unix     March 1997
     Use EXPAND_TILDE() under Unix         September 1997
     Converted to IDL V5.0   W. Landsman   September 1997
     Call intrinsic FILE_LINES() if V5.6 or later   December 2002
     Always return a scalar even if 1 element array is input  March 2004

Last modified by pro2html on 2004 March 19 at 04:59 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically