Previous Next        Current Page: NeXtMidas Training / Common Midas Concepts / Data Types / Lab 1 - Data Types / Exercises
back
Start Here   
Background   
Common Midas Concepts   
   + Version Numbering   
   + Basic Features   
   - Data Types   
      - Data Formats   
         - Types   
         - Modes   
         - Elements   
      - Compound Types   
      - Lab 1 - Data Types   
         - Exercises   
   + Blue Files   
   + 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   
WebStart   
Maps & Imagery   
X-Midas Interoperability   
RMIF & Remoting   
Installing NeXtMidas   
Support & Maintenance   
File Handlers   


  • Lab 1 - Data Types:
    • The following exercise is intended to show the different NeXtMidas data types. You can either type the commands or copy/past the commands into your NeXtMidas session.
      1. Enter the following commands to create three tables. Note the values assigned to LABEL2.
        nM> res two 2                            
        nM> res mytable {label1=1,label2="two"}
        nM> res mytable2 {label1=1,label2=two}
        nM> res mytable3 {label1=1,label2=^two}
        nM> res my* /all
           
          T: MYTABLE         = Table of 2 entries
          L:  LABEL1         = 1
         3S:  LABEL2          = two
          T: MYTABLE2        = Table of 2 entries
          L:  LABEL1         = 1
         3S:  LABEL2         = TWO
          T: MYTABLE3        = Table of 2 entries
          L:  LABEL1         = 1
          L:  LABEL2         = 2
                           
                         
      2. Create complex, vector and quad data types. Note that these types default to double unless cast to long, L:.
        nM> res mycd (1.2,2.3)
        nM> res myvd (1.0, 2.0,3.0)
        nM> res myqd (4,3,2,1) 
        nM> res my* /all
        
         CD: MYCD            = (1.2,2.3)
         VD: MYVD            = (1.0,2.0,3.0)
         QD: MYQD            = (4.0,3.0,2.0,1.0)
                            
        nM> res L:myql (4,3,2,1)
        nM> res myql
        
         QL: MYQL            = (4,3,2,1)
                           
                         
      3. Get current time. Note the format.
        nM> timex now
          Time = 2015:12:15::17:13:19.573  
        nM> timex ssm
          Time = 17:13:58.516  
                         

back