1
0
Fork 0

Add function_procedure example

This commit is contained in:
Timothy Warren 2021-10-04 11:16:26 -04:00
parent 9e0edbb225
commit 60c42da052
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
program function_procedure;
{$mode objfpc}{$H+}
uses strutils;
procedure DisplayMessage(const aMsg: string);
begin
WriteLn(DupeString('-', Length(aMsg)));
WriteLn(aMsg);
WriteLn(DupeString('=', Length(aMsg)));
end;
const LazDescription = 'Lazarus is a very powerful IDE';
begin
DisplayMessage(LazDescription);
DisplayMessage('The message above will now be shown backwards.');
DisplayMessage(ReverseString(LazDescription));
{$IFDEF WINDOWS}
ReadLn;
{$ENDIF}
end.