Previous Next        Current Page: NeXtMidas Training / Common Midas Concepts / Blue Files / Trimmers
Start Here   
Background   
Common Midas Concepts   
   + Version Numbering   
   + Basic Features   
   + Data Types   
   - Blue Files   
      - Basics   
      - Structure   
      - Detached   
      - File Types   
         - Type 1000   
         - Type 2000   
         - Type 3000   
         - Type 5000   
         - Type 6000   
      - Extended Type 3000/5000   
      - Qualifiers   
      - Trimmers   
      - ConsLength   
      - Time Code   
   + Lab 1   
Getting Started - Part 1   
Getting Started - Part 2   
Working with Files   
Option Trees   
Macros - Part 1 (Basics)   
Macros - Part 2 (Graphics)   
NetBeans - Part 1 (Setup)   
NetBeans - Part 2 (GUIs)   
NetBeans - Part 3 (Profiler)   
Eclipse - Part 1 (Setup)   
Eclipse - Part 2 (GUIs)   
Primitives   
Applets & WebStart   
Maps & Imagery   
X-Midas Interoperability   
RMIF & Remoting   
Installing NeXtMidas   
Support & Maintenance   
File Handlers   


  • File Trimmers:
    • File trimmers allow only a portion of a file to be read in.
    • When a file trimmer is used the file looks (to the primitive) as if file has been "trimmed" to a smaller size. The "trimming" is done internal to the Midas framework without modifying the file.
    • File trimmers are specified by appending them to the end of a file name but before any qualifiers. For example:
      myfile.prm(<start>:<end>)
      In the above example <start> is the start position in the file and <end> is the end position in the file.
      • The start/end position can be one of the following:
        blank Use the actual start/end of the file. myfile.prm(:<end>)
        myfile.prm(<start>:)
        N The absolute index (N) into the file. myfile.prm(N:<end>)
        myfile.prm(<start>:N)
        -N Start/end N elements before the end of the file. myfile.prm(-N:<end>)
        myfile.prm(<start>:-N)
        ~N Start/end at abscissa value N. myfile.prm(~N:<end>)
        myfile.prm(<start>:~N)
    • Qualifiers and trimmers can be used at the same time, with trimmers followed by qualifiers. For example:
      X-Midas:   myfile.prm(10:51)(AUX=0)
      NeXtMidas: myfile.prm(9:50){AUX=CWD}
      
    • Some details of this will vary between Midas frameworks (especially 0-based vs 1-based indexing into a file).