Browse Source

+ Added more functions yet

michael 26 years ago
parent
commit
a2c432a153
6 changed files with 55 additions and 2 deletions
  1. 2 1
      docs/sysutex/Makefile
  2. 3 0
      docs/sysutex/README
  3. 3 1
      docs/sysutex/ex71.pp
  4. 17 0
      docs/sysutex/ex72.pp
  5. 15 0
      docs/sysutex/ex73.pp
  6. 15 0
      docs/sysutex/ex74.pp

+ 2 - 1
docs/sysutex/Makefile

@@ -38,7 +38,8 @@ OBJECTS=ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 ex10 ex11 ex12\
         ex37 ex38 ex39 ex40 ex41 ex42 ex43 ex44 ex45 ex46 ex47\
         ex48 ex49 ex50 ex51 ex52 ex53 ex54 ex55 ex56 ex57 ex58\
         ex59 ex60 ex61 ex62 ex63 ex64 ex65 ex66 ex67 ex68 ex69 ex70\
-        ex71
+        ex71 ex72 ex73 ex74 
+#ex75 ex76 ex77 ex78 ex79 ex80
 # ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 ex10
 
 TEXOBJECTS=$(addsuffix .tex, $(OBJECTS))

+ 3 - 0
docs/sysutex/README

@@ -71,3 +71,6 @@ ex68.pp contains an example of the FloatToStrF function.
 ex69.pp contains an example of the FloatToText function.
 ex70.pp contains an example of the FmtStr function.
 ex71.pp contains an example of the Format function.
+ex71.pp contains an example of the FormatBuf function.
+ex73.pp contains an example of the IntToHex function.
+ex74.pp contains an example of the IntToStr function.

+ 3 - 1
docs/sysutex/ex71.pp

@@ -1,4 +1,6 @@
-Program dof;
+Program example71;
+
+{ This program demonstrates the Format function }
 
 Uses sysutils;
 

+ 17 - 0
docs/sysutex/ex72.pp

@@ -0,0 +1,17 @@
+Program Example72;
+
+{ This program demonstrates the FormatBuf function }
+
+Uses sysutils;
+
+Var 
+  S : ShortString;
+
+Const 
+  Fmt : ShortString =  'For some nice examples of fomatting see %s.';
+    
+Begin
+  S:='';
+  SetLength(S,FormatBuf (S[1],255,Fmt[1],Length(Fmt),['Format']));
+  Writeln (S);
+End.

+ 15 - 0
docs/sysutex/ex73.pp

@@ -0,0 +1,15 @@
+Program Example73;
+
+{ This program demonstrates the IntToHex function }
+
+Uses sysutils;
+
+Var I : longint;
+
+Begin
+  For I:=0 to 31 do
+      begin
+      Writeln (IntToHex(1 shl I,8));
+      Writeln (IntToHex(15 shl I,8))
+      end;
+End.

+ 15 - 0
docs/sysutex/ex74.pp

@@ -0,0 +1,15 @@
+Program Example74;
+
+{ This program demonstrates the IntToStr function }
+
+Uses sysutils;
+
+Var I : longint;
+
+Begin
+  For I:=0 to 31 do
+      begin
+      Writeln (IntToStr(1 shl I));
+      Writeln (IntToStr(15 shl I));
+      end;
+End.