Add unit file outline
This commit is contained in:
parent
1f46c445ad
commit
be5d15e988
64
unit_outline.pas
Normal file
64
unit_outline.pas
Normal 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
|
Loading…
Reference in New Issue
Block a user