Current Page:
NeXtMidas User's Guide
![]() ![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Data TypesNeXtMidas works with a wide variety of data types. The types fall into two general categories Basic Types (numeric and text data) and Compound Types (Java Objects with attributes and functions). Basic Types: Scalars, Atoms and ElementsNeXtMidas shared the standard Midas data types common to Blue Files and X-Midas It's useful to introduce a few hierarchical terms to describe NeXtMidas data organization. Generally speaking, "data" means one or more elements, which comprise one or more atoms, which in turn comprise one or more scalars. For numeric data, a scalar is a single, real-valued number stored in a integer or floating-point format; for string data, a scalar is always an eight-character, ASCII-encoded "word." NeXtMidas recognizes the scalar formats defined in the following table. It is convenient to use the indicated one-character data type codes as concise scalar format identifiers.
Note: NeXtMidas supports Nibble and Packed data for storage and transport only. Prior to any processing, the data is extracted into complete bytes. NeXtMidas recognizes the atom formats defined in the following table. It is convenient to use the indicated one-character data mode codes as concise atom format identifiers.
The number of atoms in an element depends on the high-level data structure. In the simplest case, an element comprises a single atom, and it is common to use the data mode/data type digraph to indicate the structure. For example, "CF"; connotes a set of complex-valued atoms whose real and imaginary parts are each single precision floating point numbers. More complicated structures that NeXtMidas recognizes include framed and record data. In the former case, an element comprises frame length contiguous atoms. In the latter case, an element is a record that contains one or more subrecords that might or might not have the same atomic format. If the atomic format is consistent, records are homogeneous; otherwise, they're nonhomogeneous. Compound TypesNeXtMidas provides access to many of the compound types defined in Java. The most common of these are:
Typecasting in a Macro
When displaying results parameters with
The most useful aspect of this convention is that it is not controlled by
the nM> status sine1 i:sinesizeforces SINESIZE to have a (Short) Integer type, even though
STATUS normally stores a Double precision value into a file
size result. If necessary, you can even force STATUS to
store a string result:
status/quiet sine1 s:sinesize Macros recognize the following typecasts:
It is also possible to type cast the parameters being passed into a macro, procedure or subroutine. For example: startmacro L:mynum S:mystring Note that when passing parameters as described above, "N:" refers to a Number, as shown in the Table above. Otherwise (for example, when declaring a RESULT), "N:" is a NIBBLE data type, per the table at the top of the page. Typecasting in a Primitive
Parameters passed to a primitive are handled by the int mynum = MA.getL("MYNUM"); Once inside a primitive the standard Java typecasts are used. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||