mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-20 09:09:41 +01:00
Added library example
This commit is contained in:
parent
2c476b0d22
commit
150ba339ac
@ -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.
|
||||
24
docs/refex/ex84.pp
Normal file
24
docs/refex/ex84.pp
Normal file
@ -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.
|
||||
Loading…
Reference in New Issue
Block a user