Current Page:
NeXtMidas Training
Getting Started - Part 2
Advanced Results Parameters
Type Casting
|
|
- Type Casting
- It is possible to manually cast a value to a given type.
Data Type | Type Specifier |
Signed Byte | B: |
Signed (Short) Integer | I: |
Signed Long Integer | L: |
Signed Extra-Long Integer | X: |
Single-Precision Floating Point | F: |
Double-Precision Floating Point | D: |
ASCII (similar to S:) | A: |
String | S: |
Generic Number (same as D:) | N: |
Untranslated (do not substitute results values) | U: |
Unknown (same as D: for numbers, S: all others) | _: |
Message (used only in processMessage ) | M: |
Table | T: |
Object | O: |
Boolean | Z: |
List (X-Midas 4.6.0+ only) | C: |
Table (X-Midas 4.6.0+ only) | H: |
KVList (X-Midas 4.6.0+ only) | K: |
XMValue (X-Midas 4.6.0+ only) | V: |
Data types not yet in BLUE ICD |
- Support for boolean was added in NeXtMidas 2.5.0. It has not been formally added to the
Blue File CCD or X-Midas; however X-Midas has reserved the 'Z' type letter for
this purpose.
- X-Midas 4.6.0+ List ('C'), Table ('H'), KVList ('K'), and XMValue ('V') data types
have not been formally added to the Blue File CCD or NeXtMidas.
|
X-Midas Users Take Note: |
Use of A: is discouraged in NeXtMidas, S: should be used in
place of it. The presence of A: is maintained for the benefit of X-Midas
users, but may be deprecated in the future.
|
Don't Make This Mistake: |
There are several key differences between ASCII (A:) values and String (S:) values:
- ASCII values store 7-bit ASCII characters, Strings can store Unicode characters.
- ASCII values are Fortran strings (trailing space is discarded), Strings can have
trailing white space.
- ASCII values are typically allocated in 8-byte blocks similar to the usage of the
ASCII type in a Blue File (e.g. the XA value "ABC" takes up 80 bytes, "ABC"
followed by 77 spaces that get ignored), Strings use only the space required.
- ASCII values are treated as unquoted and can lose case sensitivity within a
table in situations that a normal String would not. (While this is not
ideal, it matches legacy behavior.)
|
|
|
|