From 150ba339ac302f1353f4ddfb4a2c10b5fcad76f7 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 30 Dec 1998 22:05:41 +0000 Subject: [PATCH] Added library example --- docs/refex/README | 1 + docs/refex/ex84.pp | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 docs/refex/ex84.pp diff --git a/docs/refex/README b/docs/refex/README index 5d5d280e71..842e427192 100644 --- a/docs/refex/README +++ b/docs/refex/README @@ -86,3 +86,4 @@ ex80.pp contains an example of the High/Low functions. ex81.pp contains an example of the HexStr function. ex82.pp contains an example of the BinStr function. ex83.pp contains an example of the Assigned function. +ex84.pp contains an example of the Library keyword. \ No newline at end of file diff --git a/docs/refex/ex84.pp b/docs/refex/ex84.pp new file mode 100644 index 0000000000..02d1e98df5 --- /dev/null +++ b/docs/refex/ex84.pp @@ -0,0 +1,24 @@ +Library Greeting; + +{$Mode objpas} + +Procedure Hello; + +begin + Writeln ('Hello, World !'); +end; + +Function GetNumber (Max : longint) : Longint; + +begin + Repeat + Write ('Please enter a nuber between 0 and ',max,' : '); + ReadLn (Result); + Until (Result>=0) and (Result<=Max); +end; + +exports + Hello, + GetNumber; + +end. \ No newline at end of file