Read how much lines a external files has - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Read how much lines a external files has

SlladSllad Posts: 19Member
how to read how much lines has an txt file. what the title says...

Comments

  • Phat NatPhat Nat Posts: 757Member
    : how to read how much lines has an txt file. what the title says...
    :

    [code]
    VAR
    T : Text;
    NumLines : LongInt;

    Begin
    Assign(T,'MyFile.Txt'); Reset(T);
    While Not Eof(T) Do
    Begin
    ReadLn(T);
    Inc(NumLines);
    End;
    Close(T);
    End.
    [/code]


Sign In or Register to comment.