Current Page: NeXtMidas Training Working with Files File Basics
- - - | 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.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)