RecordsFormat Class Reference
GAMS Transfer Records Formats. More...
GAMS Transfer Records Formats.
This class holds the possible GAMS Transfer formats of records similar to an enumeration class. Note that it is not an enumeration class due to compatibility (e.g. for Octave). See Records Format for more information.
Static Public Member Functions | |
static function | int2str (in value_int) |
Converts an records format identifier to string. | |
static function | str2int (in value_str) |
Converts an records format name to an identifier. | |
static function | isValid (in value) |
Checks if a records format name or identifier is valid. | |
Member Function Documentation
◆ int2str()
|
static |
Converts an records format identifier to string.
s = RecordsFormat.int2str(i)
returns a string with the records format name for the given records format identifieri
. Ifi
is an invalid identifier, this function returns"unknown"
.
Example:
static function int2str(in value_int)
Converts an records format identifier to string.
Constant Property DENSE_MATRIX
identifier for records format as dense matrix
Definition: RecordsFormat.m:76
s
equals "dense_matrix"
◆ isValid()
|
static |
Checks if a records format name or identifier is valid.
b = RecordsFormat.isValid(s)
returnstrue
ifs
is a valid records format name or records format identifier andfalse
otherwise.
Example:
static function isValid(in value)
Checks if a records format name or identifier is valid.
◆ str2int()
|
static |
Converts an records format name to an identifier.
i = RecordsFormat.str2int(s)
returns an integer identifier for the given records format names
. Ifs
is an invalid format name, this function returnsRecordsFormat.UNKNOWN
.
Example:
static function str2int(in value_str)
Converts an records format name to an identifier.
i
equals RecordsFormat.DENSE_MATRIX