next up previous contents
Next: 3.1.3 How to Process Up: 3.1 How to Process Previous: 3.1.1 How to Process   Contents


3.1.2 How to Process an Integer

As explained in Section 2.2.3, an integer parameter is declared by the Integer element. Below is an example that reads six integers from two different lines (records).

Note that the order in the FileData section is completely independent of the order in the FileStructure section; just be sure that every element to be read in the FileStructure section is defined in the FileData section.

Snippet from the Input Deck

322   68   2100
320   68   2100

Snippet from the FSML File

<FileData>
  <Integer name="lenD"  description="length, feet, designed"
                        group="Design"/>
  <Integer name="lenB"  description="length, feet, as built"
                        group="As Built"/>
  <Integer name="beamD" description="beam, feet, designed"
                        group="Design"/>
  <Integer name="beamB" description="beam, feet, as built"
                        group="As Built"/>
  <Integer name="dispD" description="displacement, tons, designed"
                        group="Design"/>
  <Integer name="dispB" description="displacement, tons, as built"
                        group="As Built"/>
</FileData>
 
<FileStructure>
  <Record ignoreOnRead="false"/>
    <SetValue target="lenD"/>
    <SetValue target="beamD"/>
    <SetValue target="dispD"/>
  </Record>
  <Record ignoreOnRead="false"/>
    <SetValue target="lenB"/>
    <SetValue target="beamB"/>
    <SetValue target="dispB"/>
  </Record>
</FileStructure>


next up previous contents
Next: 3.1.3 How to Process Up: 3.1 How to Process Previous: 3.1.1 How to Process   Contents

SAIC Ship Technology Division, Annapolis, Maryland, USA
2004-10-26