Previous Next        Current Page: NeXtMidas Training / Working with Files / File Basics
back
Start Here   
Background   
Common Midas Concepts   
Getting Started - Part 1   
Getting Started - Part 2   
Working with Files   
   - File Basics   
   + The AUX List   
   + Basic File Commands   
   + Lab 1   
   + File Names   
   + File Types   
   + Lab 2   
   + Listing Files   
   + Lab 3   
   + Plotting Files   
   + Lab 4   
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   
WebStart   
Maps & Imagery   
X-Midas Interoperability   
RMIF & Remoting   
Installing NeXtMidas   
Support & Maintenance   
File Handlers   


  • Basics of NeXtMidas files:
    • NeXtMidas file names are generally case-sensitive; but there are exceptions...
      • If the file name or path is all uppercase, it is treated as lowercase.
        /HOME/BURDELL/MYFILE.PRM -->becomes--> /home/burdell/myfile.prm
      • Spaces are NOT permitted.
        /home/burdell/my file with spaces.prm <--Not Allowed!
      • A file name with no extension is assumed to be a .prm or .tmp file.
        myfile -->becomes--> myfile.prm or myfile.tmp
      • Why the exceptions?
        • Legacy - File names are case-insensitive in X-Midas (everything is lower case).
        • Legacy - File names without extensions are assumed to be .prm or .tmp files in X-Midas.
        • Legacy - Using a result when forming a file name often results in an uppercase string.
        • Legacy - Spaces are a Midas delimiter.
    • Files can be accessed as traditional filenames or URLs.
      nM> status /home/midas/nxmxxx/nxm/sys/dat/world.prm
      nM> status file:///home/midas/nxmxxx/nxm/sys/dat/world.prm
      nM> status http://nextmidas.techma.com/nmroot/nxm/sys/dat/world.prm
    • File data is accessed as offsets, 0 to (size-1).
      • Iterators such as the FOREACH command help to make this difference transparent in some cases.
    • In addition to Blue files NeXtMidas supports:
      • XML - Extensible Markup Language
      • Text - Standard text files
      • CSV - Comma-separated value
      • Image - jpeg, gif, ... for plotting
      • Table - NeXtMidas serialized tables
      • ...and more!
    • See the FILE explain file and the API for nxm.sys.libg.File for more details.
X-Midas Users Take Note:
  • In NeXtMidas, the command nM> waveform Temp creates a file called Temp. In X-Midas, the same command creates a file called temp.
  • Think of data addressing as one-based in X-Midas (follows Fortran standards) and zero-based in NeXtMidas (follows C/C++/Java standards). Some people like to think of the difference in terms of using an index value in X-Midas and using an offset value in NeXtMidas, though this terminology is far from universal (officially Java and Fortran both use the term "index" but with different definitions)

back