DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


Class TMixedFStream

Declaration: TMixedFStream = class(TMixedFStream)
The class TMixedFStream will open a named file and provide methods to read from or write to it. The class supports mixed mode files (binary and readable parts mixed). The following list provides the most important properties and methods of the TMixedFStream class:

Properties

Methods

 

Sample
program:
The following short program shows how to read a text file line by line. The read lines are displayed in the console window:
program ReadTextFile;

var
  i              : integer;
  FName          : string;
  fs             : TMixedFStream;
  astr           : string;

begin
FName := SelectFile (GetDLabDir(ddWork), '*.txt', 'Select a file');
if FName <> '' then
  begin
  fs := TMixedFStream.Create (FName, fmOpenRead);
  while not fs.Eos do
    begin
    astr := fs.ReadLn(0);
    couts (astr);
    end;
  fs.Free;
  end;
end.