Add Pascal samples (#1358)

Add Pascal samples
This commit is contained in:
Alexandru Dima 2019-09-19 10:41:25 +02:00 committed by GitHub
commit 40cf59faad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,28 @@
program GreetingsNumberOfTimes;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils;
var
greetingsMessage: string;
numberOfTimes, i: integer;
begin
try
{ TODO -oUser -cConsole Main : Insert code here }
greetingsMessage := 'Hello World!';
numberOfTimes := 10;
for i := 1 to numberOfTimes do
begin
Writeln(greetingsMessage);
end;
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end.