Author: mbenson
Date: Thu Mar 24 15:45:59 2011
New Revision: 1085008

URL: http://svn.apache.org/viewvc?rev=1085008&view=rev
Log:
added fill character examples to userguide

Modified:
    commons/sandbox/flatfile/trunk/src/site/xdoc/userguide.xml

Modified: commons/sandbox/flatfile/trunk/src/site/xdoc/userguide.xml
URL: 
http://svn.apache.org/viewvc/commons/sandbox/flatfile/trunk/src/site/xdoc/userguide.xml?rev=1085008&r1=1085007&r2=1085008&view=diff
==============================================================================
--- commons/sandbox/flatfile/trunk/src/site/xdoc/userguide.xml (original)
+++ commons/sandbox/flatfile/trunk/src/site/xdoc/userguide.xml Thu Mar 24 
15:45:59 2011
@@ -94,12 +94,23 @@
 <em>// type <strong>foo</strong>, length 1:</em>
 foo (1), <em>//the comma is optional</em><br />
 
-<em>// type <strong>bar</strong>, length 3, default value "bar":</em>
+<em>/* type <strong>bar</strong>, length 3 with default value "bar".
+   Note that string literals, including unicode chars, are as in Java:
+ */</em>
 bar (3) "bar"
 
+<em>/* type <strong>optionalField</strong>, length 10, default value of all 
underscores
+   specified using the <code>'c'*</code> "fill-character" syntax.
+   Again note that character literals, including unicode representation, are 
as in Java:
+ */</em>
+optionalField (10) '_'* 
+
 <em>// type <strong>baz</strong>, default value "baz", length (3) 
implicit:</em>
 baz "baz"
 
+<em>// type <strong>delimiter</strong> immutable field of length 3 filled with 
asterisks:</em>
+delimiter (3) '*'*!
+
 <em>// type <strong>blah</strong>, immutable value "blah", length (4) 
implicit:</em>
 blah "blah"!
 
@@ -126,6 +137,14 @@ complexArray {
   b (2)
   c (3)
 } [3]
+
+<em>// previous example, initialized to all spaces:</em>
+complexArray {
+  a (1)
+  b (2)
+  c (3)
+} [3] ' '*
+
         </pre>
         </p>
       </subsection>
@@ -299,7 +318,8 @@ truncateMe (20) overflow=IGNORE
       <subsection name="Entity Checks">
         <p>A final feature of the DSL-based <code>EntityFactory</code> is the 
idea that it
           may run a number of checks against entities as they are read from 
the definition file.
-          The only check implemented as of now is the length check.
+          The only check implemented at this time is the <em>length</em> 
check, which is
+          specified by appending a colon and expected length after any entity 
definition, as shown:
           <pre>
   myRecord {
     a (10)


Reply via email to