program Shacho3_2;
{$APPTYPE CONSOLE}
uses
SysUtils,
UnitShain in 'UnitShain.pas',
UnitShunin in 'UnitShunin.pas',
UnitTanto in 'UnitTanto.pas',
UnitTorishimariyaku in '..\3-4\UnitTorishimariyaku.pas';
var
Shain : TShain;
begin
try
Shain := nil;
try
if ParamCount > 0 then
begin
if ParamStr(1) = 'Tanto' then
Shain := TTanto.Create
else if ParamStr(1) = 'Shunin' then
Shain := TShunin.Create
else if ParamStr(1) = 'Bucho' then
Shain := TBucho.Create
else
raise Exception.Create('役職エラー');
end
else
raise Exception.Create('役職エラー');
Shain.Standup;
finally
Shain.Free;
end;
except on E:exception do
Writeln(E.message);
end;
end.
|