Skip to content

Commit

Permalink
Add Pascal samples (#1358)
Browse files Browse the repository at this point in the history
Add Pascal samples
  • Loading branch information
alexdima committed Sep 19, 2019
2 parents 1579caf + dc033ae commit 40cf59f
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/samples/sample.pascal.txt
@@ -0,0 +1,29 @@
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.

28 changes: 28 additions & 0 deletions website/index/samples/sample.pascal.txt
@@ -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.

0 comments on commit 40cf59f

Please sign in to comment.