Selasa, 17 Maret 2020

Small Basic: How to count how many lines in a file

Hello Small Basic Programmer, Welcome.

This is how you can count how many lines are there in a file:
Filepath = ""
i = 0

While x <> ""
i = i + 1
x = File.readline(filepath,i)
y[i]=x
endwhile

If i = 0 then
thelinenumber = 0
else
thelinenumber = i - 1
endif



Tidak ada komentar:

Posting Komentar