Prechádzať zdrojové kódy

+ Added MoveChar0 example

michael 25 rokov pred
rodič
commit
bb884a3993
3 zmenil súbory, kde vykonal 28 pridanie a 1 odobranie
  1. 2 1
      docs/refex/Makefile
  2. 7 0
      docs/refex/README
  3. 19 0
      docs/refex/ex109.pp

+ 2 - 1
docs/refex/Makefile

@@ -39,7 +39,8 @@ OBJECTS=ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 ex10 ex11 ex12 ex13 ex14 \
         ex54 ex55 ex56 ex57 ex58 ex59 ex60 ex61 ex62 ex63 ex64 ex65 ex66 \
         ex67 ex68 ex69 ex70 ex71 ex72 ex73 ex74 ex75 ex76 ex77 ex78 ex79 \
 	ex80 ex81 ex82 ex83 ex84 ex85 ex86 ex87 ex88 ex89 \
-	ex90 ex91 ex92 ex93 ex94 ex95 ex96 ex97 ex98 ex99 ex100 ex101 ex102
+	ex90 ex91 ex92 ex93 ex94 ex95 ex96 ex97 ex98 ex99 ex100 ex101 ex102\
+        ex103 ex104 ex105 ex106 ex107 ex108 ex109
 
 TEXOBJECTS=$(addsuffix .tex, $(OBJECTS))
 

+ 7 - 0
docs/refex/README

@@ -105,3 +105,10 @@ ex99.pp contains an example of the CompareByte function.
 ex100.pp contains an example of the CompareChar function.
 ex101.pp contains an example of the CompareDWord function.
 ex102.pp contains an example of the CompareWord function.
+ex103.pp contains an example of the FillByte function
+ex104.pp contains an example of the FillDWord function
+ex105.pp contains an example of the IndexByte function.
+ex106.pp contains an example of the IndexWord function.
+ex107.pp contains an example of the IndexDWord function.
+ex108.pp contains an example of the IndexChar function.
+ex109.pp contains an example of the MoveChar0 function.

+ 19 - 0
docs/refex/ex109.pp

@@ -0,0 +1,19 @@
+Program Example109;
+
+{ Program to demonstrate the MoveChar0 function. }
+
+Var 
+  Buf1,Buf2 : Array[1..80] of char;
+  I : longint;
+    
+begin
+  Randomize;
+  For I:=1 to 80 do
+    Buf1[i]:=chr(Random(16)+Ord('A'));
+  Writeln('Original buffer');
+  writeln(Buf1);
+  Buf1[Random(80)+1]:=#0;
+  MoveChar0(Buf1,Buf2,80);  
+  Writeln('Randomly zero-terminated Buffer');
+  Writeln(Buf2);
+end.