+ Initial implementation of examples

This commit is contained in:
michael 1999-04-14 23:12:31 +00:00
parent 38379e14b9
commit d9749fb889
6 changed files with 54 additions and 0 deletions

5
docs/sysutex/README Normal file
View File

@ -0,0 +1,5 @@
This directory contains the examples for the Sysutils unit.
ex1.pp contains an example of the Date function.
ex2.pp contains an example of the DateTimeToFileDate function.
ex3.pp contains an example of the DateTimeToStr function.

13
docs/sysutex/ex1.pp Normal file
View File

@ -0,0 +1,13 @@
Program Example1;
{ This program demonstrates the Date function }
uses sysutils;
Var YY,MM,DD : Word;
Begin
Writeln ('Date : ',Date);
DeCodeDate (Date,YY,MM,DD);
Writeln (format ('Date is (DD/MM/YY): %d/%d/%d ',[dd,mm,yy]));
End.

9
docs/sysutex/ex2.pp Normal file
View File

@ -0,0 +1,9 @@
Program Example2;
{ This program demonstrates the DateTimeToFileDate function }
Uses sysutils;
Begin
Writeln ('FileTime of now would be: ',DateTimeToFileDate (Now));
End.

10
docs/sysutex/ex3.pp Normal file
View File

@ -0,0 +1,10 @@
Program Example3;
{ This program demonstrates the DateTimeToStr function }
Uses sysutils;
Begin
Writeln ('Today is : ',DateTimeToStr(Now));
Writeln ('Today is : ',FormatDateTime('c',Now));
End.

9
docs/sysutex/newex Normal file
View File

@ -0,0 +1,9 @@
#!/bin/sh
if [ -e ex${1}.pp ]; then
mv ex${1}.pp ex${1}.pp.orig
fi
sed -e s/Example/Example$1/ -e s/\\\*\\\*\\\*/$2/ <template.pp >ex${1}.pp
echo "ex${1}.pp contains an example of the $2 function." >>README
joe ex${1}.pp
ppc386 ex${1}.pp && ex${1}
rm ex${1}.o

8
docs/sysutex/template.pp Normal file
View File

@ -0,0 +1,8 @@
Program Example;
{ This program demonstrates the *** function }
Uses sysutils;
Begin
End.