Zoo tutorials: [ SQL | Linux | XML ]
ProgZoo: [ Java | C# | VB | C++ | Perl ]
Log in

A Gentle Introduction to
VB Programming

Tutorial: Reading from a text file

 
A program that processes a text file typically has the following stages: A program with this structure will usually be more efficient than one that the entire file in one go.

1. Reading lines


Big

The text file greeks.txt contains a single word on each line.

This program reads the file line by line and prints all the lines with four characters.

Note that the end-of-line character is not included in the count.