1
0

Add unit file outline

This commit is contained in:
Timothy Warren 2021-10-08 14:32:49 -04:00
parent 1f46c445ad
commit be5d15e988

64
unit_outline.pas Normal file
View File

@ -0,0 +1,64 @@
unit unit_outline; // mandatory unit name
interface // mandatory 'public' declaration section
uses
Classes;
// Global typed
type
TCountry = record
Name: string;
Area: LongInt;
end;
// Global variables
var
aCountry: TCountry;
// Global constants
const
GoldenSection = 1.62;
// Global/public interface
procedure ExampleProc;
implementation // mandatory 'private' declaration section
// 'Private' imports
uses
StrUtils;
// Type declarations private to this implementation section
type
TCar = record
Make: string;
Model: string;
ModelYear: UInt16;
end;
// Variables private to this implementation section
var
aCar: TCar;
// Constants private to this implementation section
const
password = 'hiddenPassword';
procedure ExampleProc;
procedure HiddenProc;
begin
// code for the nexted procedure HiddenProc
end;
begin
// code for the main body of global procedure
HiddenProc;
end;
initialization
// optional initializatino code codes here
finalization
// optinal final (clean-up) code goes here
end. // mandatory unit end