Pascal samples. Units.


unit MyUnit;
interface
var
  I: Integer = 4;
const
  S = 'abc';

procedure Proc(X: Integer);

implementation

var
  J: Integer = 10;

procedure Proc(X: Integer);
begin
  writeln(X);
end;

initialization
  writeln('Initialization');
  I := 10;
finalization
  writeln('finalization');

end.
Main program:
program Demo;
uses MyUnit;
begin
  writeln(I);
  writeln(S);
  Proc(123);
end.


Copyright © 2006-2017 Alexander Baranovsky. All rights reserved.