Index: ex71.pp
===================================================================
--- ex71.pp	(revision 789)
+++ ex71.pp	(working copy)
@@ -9,8 +9,20 @@
 Var P : Pointer;
     fmt,S : string;
 
+{ Expected output:
+        [%d] => [10]
+        [%%] => [%]
+      [%10d] => [        10]
+      [%.4d] => [0010]
+    [%10.4d] => [      0010]
+      [%0:d] => [10]
+    [%0:10d] => [        10]
+  [%0:10.4d] => [      0010]
+   [%0:-10d] => [10        ]
+ [%0:-10.4d] => [0010      ]
+    [%-*.*d] => [00010]
+}
 Procedure TestInteger;
-
 begin
   Try
     Fmt:='[%d]';S:=Format (Fmt,[10]);writeln(Fmt:12,' => ',s);
@@ -34,8 +46,18 @@
   readln;
 end;
 
+{ Expected output:
+        [%x] => [A]
+      [%10x] => [         A]
+    [%10.4x] => [      000A]
+      [%0:x] => [A]
+    [%0:10x] => [         A]
+  [%0:10.4x] => [      000A]
+   [%0:-10x] => [A         ]
+ [%0:-10.4x] => [000A      ]
+    [%-*.*x] => [0000A]
+}
 Procedure TestHexaDecimal;
-
 begin
   try
     Fmt:='[%x]';S:=Format (Fmt,[10]);writeln(Fmt:12,' => ',s);
@@ -57,8 +79,18 @@
   readln;
 end;
 
+{ Expected output:
+      [0x%p] => [0x0012D687]
+    [0x%10p] => [0x  0012D687]
+  [0x%10.4p] => [0x  0012D687]
+    [0x%0:p] => [0x0012D687]
+  [0x%0:10p] => [0x  0012D687]
+[0x%0:10.4p] => [0x  0012D687]
+ [0x%0:-10p] => [0x0012D687  ]
+[0x%0:-10.4p] => [0x0012D687  ]
+    [%-*.*p] => [0012D687]
+}
 Procedure TestPointer;
-
 begin
   P:=Pointer(1234567);
   try
@@ -81,8 +113,15 @@
   readln;
 end;
 
+{ Expected output:
+        [%s]=> [This is a string]
+      [%0:s]=> [This is a string]
+    [%0:18s]=> [  This is a string]
+   [%0:-18s]=> [This is a string  ]
+ [%0:18.12s]=> [      This is a st]
+    [%-*.*s]=> [This is a st      ]
+}
 Procedure TestString;
-
 begin
   try
     Fmt:='[%s]';S:=Format(fmt,['This is a string']);Writeln(fmt:12,'=> ',s);
@@ -101,8 +140,18 @@
   readln;
 end;
 
+{ Expected output:
+        [%e] => [1.2340000000000000E+000]
+      [%10e] => [1.2340000000000000E+000]
+    [%10.4e] => [1.234E+000]
+      [%0:e] => [1.2340000000000000E+000]
+    [%0:10e] => [1.2340000000000000E+000]
+  [%0:10.4e] => [1.234E+000]
+   [%0:-10e] => [1.2340000000000000E+000]
+ [%0:-10.4e] => [1.234E+000]
+    [%-*.*e] => [1.2340E+000]
+}
 Procedure TestExponential;
-
 begin
   Try
     Fmt:='[%e]';S:=Format (Fmt,[1.234]);writeln(Fmt:12,' => ',s);
@@ -124,8 +173,18 @@
   readln;
 end;
 
+{ Expected output:
+        [%e] => [-1.2340000000000000E+000]
+      [%10e] => [-1.2340000000000000E+000]
+    [%10.4e] => [-1.234E+000]
+      [%0:e] => [-1.2340000000000000E+000]
+    [%0:10e] => [-1.2340000000000000E+000]
+  [%0:10.4e] => [-1.234E+000]
+   [%0:-10e] => [-1.2340000000000000E+000]
+ [%0:-10.4e] => [-1.234E+000]
+    [%-*.*e] => [-1.2340E+000]
+}
 Procedure TestNegativeExponential;
-
 begin
   Try
     Fmt:='[%e]';S:=Format (Fmt,[-1.234]);writeln(Fmt:12,' => ',s);
@@ -147,8 +206,18 @@
   readln;
 end;
 
+{ Expected output:
+        [%e] => [1.2340000000000000E-002]
+      [%10e] => [1.2340000000000000E-002]
+    [%10.4e] => [1.234E-002]
+      [%0:e] => [1.2340000000000000E-002]
+    [%0:10e] => [1.2340000000000000E-002]
+  [%0:10.4e] => [1.234E-002]
+   [%0:-10e] => [1.2300000000000000E-002]
+ [%0:-10.4e] => [1.234E-002]
+    [%-*.*e] => [1.2340E-002]
+}
 Procedure TestSmallExponential;
-
 begin
   Try
     Fmt:='[%e]';S:=Format (Fmt,[0.01234]);writeln(Fmt:12,' => ',s);
@@ -170,8 +239,18 @@
   readln;
 end;
 
+{ Expected output:
+        [%e] => [-1.2340000000000000E-002]
+      [%10e] => [-1.2340000000000000E-002]
+    [%10.4e] => [-1.234E-002]
+      [%0:e] => [-1.2340000000000000E-002]
+    [%0:10e] => [-1.2340000000000000E-002]
+  [%0:10.4e] => [-1.234E-002]
+   [%0:-10e] => [-1.2340000000000000E-002]
+ [%0:-10.4e] => [-1.234E-002]
+    [%-*.*e] => [-1.2340E-002]
+}
 Procedure TestSmallNegExponential;
-
 begin
   Try
     Fmt:='[%e]';S:=Format (Fmt,[-0.01234]);writeln(Fmt:12,' => ',s);
@@ -197,9 +276,9 @@
   TestInteger;
   TestHexadecimal;
   TestPointer;
+  teststring;
   TestExponential;
   TestNegativeExponential;
   TestSmallExponential;
   TestSmallNegExponential;
-  teststring;
-end.
\ No newline at end of file
+end.
