소스 검색

+ Added examples 7-12

michael 26 년 전
부모
커밋
d625ef5b16
8개의 변경된 파일73개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      docs/sysutex/Makefile
  2. 6 0
      docs/sysutex/README
  3. 12 0
      docs/sysutex/ex10.pp
  4. 12 0
      docs/sysutex/ex11.pp
  5. 12 0
      docs/sysutex/ex12.pp
  6. 9 0
      docs/sysutex/ex7.pp
  7. 9 0
      docs/sysutex/ex8.pp
  8. 12 0
      docs/sysutex/ex9.pp

+ 1 - 1
docs/sysutex/Makefile

@@ -32,7 +32,7 @@ endif
 
 .PHONY: all tex clean
 
-OBJECTS=ex1 ex2 ex3 ex4 ex5
+OBJECTS=ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 ex10 ex11 ex12
 
 TEXOBJECTS=$(addsuffix .tex, $(OBJECTS))
 

+ 6 - 0
docs/sysutex/README

@@ -6,3 +6,9 @@ ex3.pp contains an example of the DateTimeToStr function.
 ex4.pp contains an example of the DateTimeToString function.
 ex5.pp contains an example of the DateTimeToSystemTime function.
 ex6.pp contains an example of the DateTimeToTimeStamp function.
+ex7.pp contains an example of the DateToStr function.
+exex8.pp contains an example of the DayOfWeek function.
+ex9.pp contains an example of the DecodeDate function.
+ex10.pp contains an example of the DecodeTime function.
+ex11.pp contains an example of the EncodeDate function.
+ex12.pp contains an example of the EncodeTime function.

+ 12 - 0
docs/sysutex/ex10.pp

@@ -0,0 +1,12 @@
+Program Example10;
+
+{ This program demonstrates the DecodeTime function }
+
+Uses sysutils;
+
+Var HH,MM,SS,MS: Word;
+
+Begin
+  DecodeTime(Time,HH,MM,SS,MS);
+  Writeln (format('The time is %d:%d:%d.%d',[hh,mm,ss,ms]));
+End.

+ 12 - 0
docs/sysutex/ex11.pp

@@ -0,0 +1,12 @@
+Program Example11;
+
+{ This program demonstrates the EncodeDate function }
+
+Uses sysutils;
+
+Var YY,MM,DD : Word;
+
+Begin
+  DecodeDate (Date,YY,MM,DD);
+  WriteLn ('Today is : ',FormatDateTime ('dd mmmm yyyy',EnCodeDate(YY,Mm,Dd)));
+End.

+ 12 - 0
docs/sysutex/ex12.pp

@@ -0,0 +1,12 @@
+Program Example12;
+
+{ This program demonstrates the EncodeTime function }
+
+Uses sysutils;
+
+Var Hh,MM,SS,MS : Word;
+
+Begin
+  DeCodeTime (Time,Hh,MM,SS,MS);
+  Writeln ('Present Time is : ',FormatDateTime('hh:mm:ss',EnCodeTime (HH,MM,SS,MS)));
+End.

+ 9 - 0
docs/sysutex/ex7.pp

@@ -0,0 +1,9 @@
+Program Example7;
+
+{ This program demonstrates the DateToStr function }
+
+Uses sysutils;
+
+Begin
+  Writeln(Format ('Today is: %s',[DateToStr(Date)]));
+End.

+ 9 - 0
docs/sysutex/ex8.pp

@@ -0,0 +1,9 @@
+Program Example8;
+
+{ This program demonstrates the DayOfWeek function }
+
+Uses sysutils;
+
+Begin
+  Writeln ('Today''s day is ',LongDayNames[DayOfWeek(Date)]);
+End.

+ 12 - 0
docs/sysutex/ex9.pp

@@ -0,0 +1,12 @@
+Program Example9;
+
+{ This program demonstrates the DecodeDate function }
+
+Uses sysutils;
+
+Var YY,MM,DD : Word;
+
+Begin
+  DecodeDate(Date,YY,MM,DD);
+  Writeln (Format ('Today is %d/%d/%d',[dd,mm,yy]));
+End.