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

Home » Public Forums » archive » Re: reading long files
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 long files [message #1431] Wed, 10 November 1993 00:54 Go to previous message
knipp is currently offline  knipp
Messages: 68
Registered: January 1993
Member
In article 12269@newsserver.rrzn.uni-hannover.de, knipp@ipi.uni-hannover.de (K Knipp) writes:
>
> A more general way is to count the number of carr.returns in the file:
>
> CR_BYTE = 10b ; (p.e. for UNIX-Systems)
>
> OPENR, UNIT, FILENAME, /GET_LUN
> INFO = FSTAT(UNIT)
> I = ASSOC(UNIT, BYTARR(INFO.SIZE))
> POS = WHERE(I(0) EQ CR_BYTE)
> FREE_LUN, UNIT
>
> NOF_LINES = N_ELEMENTS(POS)
>


Sorry, but I mixed up LINEFEED and CARRIAGE RETURN. Nevertheless the code
above is correct with ascii 10, which off course is LINEFEED under UNIX.

Karl

____________________________________________________________ __________________
__ ____ __
/ // _ \ / / Karlheinz Knipp phone: +49 511 - 762 4922
/ // /_/ // / University of Hannover fax: +49 511 - 762 2483
/ // ____// / Institute for Photogrammetry
/ // / / / Nienburger Str.1
/_//_/ /_/ FRG 30167 Hannover 1 email: knipp@ipi.uni-hannover.de
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: VMS input file line counting procedure
Next Topic: netCDF files in IDL?

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

Current Time: Wed Oct 08 17:57:42 PDT 2025

Total time taken to generate the page: 0.00433 seconds