1
0
lazarus-tutorials/simple_examples/function_procedure.pas
2021-10-04 11:16:26 -04:00

23 lines
475 B
ObjectPascal

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.