B. CONSTANTS, FUNCTIONS, AND EXPRESSIONS
GAMBIT provides the following predefined constants for use in any value expression.
| Constant | Value | Description |
| PI | 3.141592653590 | |
| TWOPI | 6.283185307180 | |
| DEG2RAD | 0.0174532925199 | Degree-to-radian conversion factor |
| RAD2DEG | 57.29577951308 | Radian-to-degree conversion factor |
GAMBIT provides the following types of interpreter functions:
Math functions include trigonometric and general math functions that operate only on a single numerical value. (NOTE: All math function evaluations return a single value.) String functions manipulate alphanumeric strings. System functions return information about the operating system. Model functions provide information on the GAMBIT model and default settings. (NOTE: If a function fails, GAMBIT returns an empty string for string functions, a zero value for numeric functions, or a zero vector for vector functions.)The following sections describe the functions listed above.
GAMBIT provides two types of math functions: trigonometric and general.
| Function | Description |
| ACOS (x) | Angle whose cosine is x |
| ASIN (x) | Angle whose sin is x |
| ATAN (x) | Angle whose tan is x |
| COS (x) | Cosine of x |
| COSH (x) | Hyperbolic cosine of x |
| SIN (x) | Sine of x |
| SINH (x) | Hyperbolic sine of x |
| TAN (x) | Tangent of x |
| TANH (x) | Hyperbolic tangent of x |
| Function | Description |
| ABS (x) | Absolute value of x,
|
| EXP (x) | Exponential of x,
|
| INT (x) | Integer truncation of x |
| LOG (x) | Natural logarithm of x,
|
| LOG10 (x) | Base-10 logarithm of x,
|
| MAX ( |
Maximum of x or y |
| MIN ( |
Minimum of |
| MOD ( |
Modulo or remainder:
|
| POW ( |
x raised to the
power y, |
| SIGN (x) | -1.0 if x is negative, else 1.0 |
| SQRT (x) | Square root of x |
| NOTE (1): The arguments x and y in the functions listed above represent any valid value expressionthat is, a number, constant, function, arithmetic expression, or parameter. |
| NOTE (2): All trigonometric functions require and return values expressed in degrees. |
The string functions available in GAMBIT are as follows.
| Function | Definition |
| = | String assignment |
| + | String concatenation |
| CSTRCMP | Case-insensitive lexicographic string compare |
| CSTRNCMP | Case-insensitive lexicographic substring compare |
| DIRNAME | Directory path portion of a file name containing a directory path |
| DIRPLUSFILE | Combine a directory path and file name |
| DIRPLUSSUBDIR | Combine a directory path and subdirectory path |
| FILENAME | File name portion of a file name containing a directory path |
| FILEPREFIX | Prefix of a file name |
| FILESUFFIX | Suffix of a file name |
| NTOS | Numeric to string representation conversion |
| STON | String to numeric representation conversion |
| STRCMP | Case-sensitive lexicographic string compare |
| STRFMT | String formatting |
| STRLEN | Number of characters in a string |
| STRNCMP | Case-sensitive lexicographic substring compare |
| STRRSTR | Offset of the last occurrence of a substring within a string |
| STRSTR | Offset of the first occurrence of a substring within a string |
| STRTOLC | Convert a string to lower case |
| STRTOUC | Convert a string to upper case |
| SUBSTR | Substring extraction |
The follow subsections describe and show examples of each of the functions listed above.
String assignment allows the user to assign a string value to a parameter in GAMBIT. Assigned strings may be literal strings enclosed in double quotation marks or other string parameters.
Examples
$X = "STRING"
$Y = $X
String concatenation allows the user to concatenate string values in parameters in GAMBIT. Literal strings and string parameters can be concatenated in any combination.
Examples
$X = "ABC" + "DEF"
$X = $Y + "DEF"
CSTRCMPCase-Insensitive String Compare
CSTRCMP performs a character-by-character comparison of two stringsstring1 and string2and ignores the case of each character until a difference is found or the end of string1 is reached. CSTRCMP returns a numeric value that indicates whether string1 is greater than, equal to or less than string2. The value indicates the logical relationship between string1 and string2 as follows.
Value |
Relationship |
> 0 |
string1 is greater than string2 |
< 0 |
string1 is less than string2 |
= 0 |
string1 equals string2 |
Format
CSTRCMP(string1, string2)
Example
The following function call returns the numeric value of zero (0) in parameter X, indicating that string1 and string2 are equal:
$X = CSTRCMP("ABCDEFGHI", "abcdefghi")
CSTRNCMPCase-Insensitive Substring Compare
CSTRNCMP performs a character-by-character comparison of two stringsstring1 and string2and ignores the case of each character until a difference is found or a specified number of characters (length) have been compared. CSTRNCMP returns a numeric value indicating whether length characters in string1 are greater than, equal to or less than length characters in string2. The value indicates the logical relationship between string1 and string2 as follows.
Value |
Relationship |
> 0 |
length characters in string1 are greater than length characters in string2 |
< 0 |
length characters in string1 are less than length characters in string2 |
= 0 |
length characters in string1 equal length characters in string2 |
Format
CSTRNCMP(string1, string2, length)
Example
The following function call returns the numeric value zero (0) in parameter X, indicating that the first four characters in string1 are equal to the first four characters in string2:
$X = CSTRNCMP("ABCDEFGH", "abcdwxyz", 4)
DIRNAME returns the directory path portion of a file name which contains a directory path by searching for a "/" or "\" in a file name (filename) and returning the portion of filename from the beginning of filename up to but not including the last "/" or "\" found. If no "/" or "\" is found in filename, the function returns an empty string.
Format
DIRNAME(filename)
Example
The following function call returns the string value "/users/prob1" in parameter X:
$X = DIRNAME("/users/prob1/prob1.dbs")
DIRPLUSFILEDirectory Path and File Name
DIRPLUSFILE returns a string consisting of the directory name (directory) and filename combined with the appropriate "/" or "\" characters where necessary.
Format
DIRPLUSFILE(filename, filename)
Example
The following function call returns the string value "/users/prob1/ prob1.dbs" in parameter X:
$X = DIRPLUSFILE("/users/prob1", "prob1.dbs")
DIRPLUSSUBDIRDirectory and Subdirectory Path
DIRPLUSSUBDIR returns the directory path name consisting of the directory name (directory) and subdirectory name (subdirectory) combined with the appropriate "/" or "\" characters placed where necessary.
Format
DIRPLUSSUBDIR(filename, filename)
Example
The following function call returns the string value "/users/prob1" in parameter X:
$X = DIRPLUSSUBDIR("/users", "prob1")
FILENAME returns only the file name portion of a file name containing a directory path. FILENAME searches for the last occurrence of "/" or "\" in filename and returns the portion of filename to the right of the last "/" or "\" found. If no "/" or "\" is found in filename, FILENAME returns an empty string.
Format
FILENAME(filename)
Example
The following function call returns the string value "prob1.dbs" in parameter X:
$X = FILENAME("/users/prob1/prob1.dbs")
FILEPREFIXPrefix of a File Name
FILEPREFIX returns the prefix of a file name by searching for a "." in filename and returning the portion of filename to the left of the "." including the path if a path is specified. If no "." is found in filename, FILEPREFIX returns an empty string.
Format
FILEPREFIX(filename)
Example
The following function call returns the string value "prob1" in parameter X:
$X = FILEPREFIX("prob1.dbs")
FILESUFFIXSuffix of a File Name
FILESUFFIX returns the suffix of a file name by searching for a "." in filename and returning the portion of filename to the right of the ".". If no "." is found in filename, FILEPREFIX returns an empty string.
Format
FILESUFFIX(filename)
Example
The following function call returns the string value "dbs" in parameter X:
$X = FILESUFFIX("prob1.dbs")
NTOSNumeric-to-String Representation Conversion
NTOS converts a numeric value (number) to its string representation and returns the corresponding string. NTOS supports scientific notation for the numeric representation but expands the number in the resulting string representation.
Format
NTOS(number)
Example
The following function call returns the string value "12300" in parameter X:
$X = NTOS(123E+2)
STONString-to-Numeric Representation Conversion
STON converts a string (string) to its numeric representation and returns the corresponding numeric value. STON ignores leading blanks and only converts the numeric characters up to the first non-numeric character encountered starting from the left of string.
Format
STON(string)
Example
The following function call returns the numeric value 127 in the scalar parameter X:
$X = STON("127")
STRCMPCase-Sensitive String Compare
STRCMP performs a character-by-character comparison of two stringsstring1 and string2taking into account the case of each character until a difference is found or the end of string1 is reached. STRCMP returns a numeric value indicating whether string1 is greater than, equal to or less than string2. The value indicates the logical relationship between string1 and string2 as follows.
Value |
Relationship |
> 0 |
string1 is greater than string2 |
< 0 |
string1 is less than string2 |
= 0 |
string1 equals string2 |
Format
STRCMP(string1, string2)
Example
The following function call returns the numeric value 0 in parameter X indicating that string1 and string2 are equal:
$X = STRCMP("ABCDEFGHI", "ABCDEFGHI")
STRFMT formats a set of arguments according to the contents of a format specifier and returns the results as a string value. The format specifier may include any combination of literals and C style format specifiers. There must be a separate format specifier for each argument in the argument list and each format specifier must be the correct type or a syntax error will occur. The available format specifiers is as follows.
Specifier |
Description |
%c |
Single character |
%d |
Integer |
%i |
Integer |
%e |
Floating point (scientific notation) |
%f |
Decimal floating point |
%g |
Use the shorter of %e or %f |
%o |
Octal |
%s |
String of characters |
%u |
Unsigned decimal |
%x |
Hexadecimal |
%% |
Print % sign |
Format
STRFMT(specifier, [ ,argument1[, argument2[, ... ]]])
Example
The following function call returns the string value "The value of Y: 10" in parameter X:
$Y = 10 $X = STRFMT ( "The value of Y: %d" , $Y )
STRLENNumber of Characters in a String
STRLEN returns the number of characters in a string (string), including blanks.
Format
STRLEN(string)
Example
The following function call returns the numeric value 8 in parameter X:
$X = STRLEN("boundary")
STRNCMPCase-Sensitive Substring Compare
STRNCMP performs a character-by-character comparison of two stringsstring1 and string2 taking into account the case of each character until a difference is found or a specified number (length) characters have been compared. STRNCMP returns a numeric value indicating whether string2 characters in string1 are greater than, equal to or less than length characters in string2. The value indicates the logical relationship between string1 and string2 as follows.
Value |
Relationship |
> 0 |
length characters in string1 are greater than length characters in string2 |
< 0 |
length character in string1 are less than length characters in string2 |
= 0 |
length characters in string1 equals length characters in string2 |
Format
STRNCMP(string1, string2, length)
Example
The following function call returns the numeric value 0 in parameter X indicating that the first four characters in string1 are equal to the first four characters in string2:
$X = STRNCMP("ABCDEFGH", "ABCDWXYZ", 4)
STRRSTROffset of Last Substring Within a String
STRRSTR returns the numeric value of the starting character position in a string variable (string) where the last occurrence of a substring (substring) is foundor returns zero (0) if substring is not found in string .
Value |
Relationship |
> 0 |
Starting character position in string where the last occurrence of substring was found |
= 0 |
substring was not found in string |
Format
STRRSTR(string, substring)
Example
The following function call returns the numeric value 10 in parameter X:
$X = STRRSTR("ABCDEFABCDEF", "DE")
STRSTROffset of First Substring Within a String
STRSTR returns the starting character position in a specified string (string) where the first occurrence of substring is found.
Value |
Relationship |
> 0 |
Starting character position in string where the first occurrence of substring was found |
= 0 |
substring was not found in string |
Format
STRSTR(string, substring)
Example
The following function call returns the numeric value four (4) in parameter X:
$X = STRSTR("ABCDEFABCDEF", "DE")
STRTOLCConvert a String to Lower Case
STRTOLC converts the alphabetic characters string to lower case.
Format
STRTOLC(string)
Example
The following function call returns the string value "abcdef" in parameter X:
$X = STRTOLC("ABCDEF")
STRTOUCConvert a String to Upper Case
STRTOUC converts the alphabetic characters string to upper case.
Format
STRTOUC(string)
Example
The following function call returns the string value "ABCDEF" in parameter X:
$X = STRTOUC("abcdef")
SUBSTR extracts a substring from a string (string) starting from a specified position (position) and continuing for a specified number of characters (length) and returns the substring value.
Format
SUBSTR(string, position, length)
Example
The following function call returns the string value "DEF" in parameter X:
$X = SUBSTR("ABCDEFGHI", 4, 3)
The system functions available in GAMBIT are as follows.
| FILEEXISTS | Flag indicating the existence or nonexistence of a specified file |
| GETCWD | Current working directory |
| GETENV | Get value of environment variable |
| UNAME | Name of current operating system |
The follow subsections describe and show examples of each of the functions listed above.
FILEEXISTSFile Existence Flag
FILEEXISTS returns a numeric value of 0 or 1 to indicate whether or not a specified file exists.
Format
FILEEXISTS(filename)
Example
If a file named "model_01.jou" exists in the current working directory, the following function call returns the numeric value of 1 in parameter X:
$X = FILEEXISTS("model_01.jou")
GETCWDCurrent Working Directory
GETCWD returns a string that represents the current GAMBIT working directory.
Format
GETCWD()
Example
If the current problem is being run in "/users/ prob1", the following function call returns the string value "/users/prob1" in parameter X:
$X = GETCWD()
Format
GETENV(env_variable)
Example
If the GAMBITROOT environment variable is set to "/usr/local/GAMBIT", the following function call returns the string value "/usr/local/GAMBIT" in parameter X:
$X = GETENV("GAMBITROOT")
UNAME returns the name of the current operating system.
Format
UNAME()
Example
If GAMBIT is running on an HP-UX system, the following function call returns the string value "HP-UX" in parameter X:
$X = UNAME()
GAMBIT provides the following modeling functions.
| Function | Definition |
| ARCLEN | Length of a specified edge or of the shortest edge in the model |
| BBOX | Coordinates that define a rectangular box bounding an individual entity or the entire model |
| ENT2LOC | Coordinates of the center point of a specified entity |
| GETIDENT | Current GAMBIT database Identifier |
| GETNORMAL | Vector normal to a specified face at a given location |
| GETSCR | Current scratch directory |
| GETTANGENT | Tangent vector to a specified edge at a given location |
| INTERSECTING | Numeric flag array indicating whether or not two entities intersect |
| LASTID | Last identifier assigned to a specified entity type |
| LISTENTITY | Filtered list of all entities of a specified type |
| LOC2ENT | Name of entity of a specified type nearest to a specified location |
| MINCLEARANCE | Array containing endpoint coordinates of shortest distance between two entities |
| NDEFAULT | Current value of a specified GAMBIT default numeric variable |
| OPERERR | Flag indicating the success or failure of the most recently attempted command |
| PARAMSIZE | Size of a specified one-dimensional parameter |
| QUALITY | Last nth entity name assigned to a specified entity type |
| RETLABEL | Last nth entity name assigned to a specified entity type |
| SDEFAULT | Current value of a specified GAMBIT default string variable |
ARCLEN returns a numeric value that represents the length of a specified edge. If you do not specify an edge name, ARCLEN returns the length of the shortest edge in the model.
Format
ARCLEN(edge)
Example
The following function call returns the length of an edge named, edge.17.
$X = ARCLEN("edge.17")
BBOX returns a numeric array of six values that define the Cartesian coordinates of diagonally opposed corners on a rectangular box that bounds an individual entity (vertex, edge, face, volume, or group) or the entire model. The array values are reported in the order: xmin, ymin, zmin, xmax, ymax, zmax. If you specify an entity name, GAMBIT returns values that define the box bounding the specified entity. If you do not specify an entity name, GAMBIT returns values that define a box bounding the entire model.
Format
BBOX(entity)
Example
The following function call returns an array of six values that define the corner coordinates of a box bounding an entity named, volume.3.
$X = BBOX("volume.3")
ENT2LOC returns a numeric array of three values that represent the Cartesian coordinates (x,y,z) of the center point of a specified entity (vertex, edge, face, or volume).
Format
ENT2LOC(entity)
Example
The following function call returns an array containing the coordinates of the center point of a face named, face.13.
$X = ENT2LOC("face.13")
GETIDENTCurrent GAMBIT Database Identifier
GETIDENT returns the current GAMBIT problem identifier.
Format
GETIDENT()
Example
If the current problem identifier is "prob1", the following function call returns the string value "prob1" in parameter X:
$X = GETIDENT()
GETNORMAL returns the components of a unit vector that constitutes the normal at a specified location on a face. The GETNORMAL function requires four arguments and includes an optional fifth argument:
Format
GETNORMAL(face, x, y, z, [volume])(NOTE: The brackets ([]) represent an optional argument.)
Example
The following function call returns the components of a unit normal vector for a face named "face.3" pointing away from an attached volume named "volume.4" at the point: x, y, z = 1,13,89.
$X = GETNORMAL("face.3", 1, 13, 89, "volume.4")
GETSCRCurrent Scratch Directory
GETSCR returns the current GAMBIT scratch directory.
Format
GETSCR()Example
If the current scratch directory is "/users/prob1", the following function call returns the string value "/users/prob1" in parameter X:
$X = GETSCR()
GETTANGENTEdge Tangent Vector
GETTANGENT returns the components of a unit vector that constitutes the tangent vector for an edge at a specified location. The GETTANGENT function requires either two or four arguments, as follows:
Format
GETTANGENT(edge, x, y, z)or
GETTANGENT(edge, u)Example
The following function call returns the components of a unit tangent vector for an edge named "edge.3" at its midpoint (using the u argument).
$X = GETTANGENT("edge.3", 0.5)
INTERSECTINGGeometry Intersection Flag
INTERSECTING returns a numeric array of six values that indicate whether or not two entities of a specified type intersect. The available types are as follows.
Type |
Description |
t_ve |
Vertices |
t_ed |
Edges |
t_fa |
Faces |
t_vo |
Volumes |
Format
INTERSECTING(entity_type, entity1, entity2)
Examples
If two volumes, labeled volume.9 and volume.121, intersect, the following function call returns a six-element array parameter, X, each element of which contains a zero (0):
$X = INTERSECTING(t_vo, "volume.9", "volume.121")
LASTID returns the last identification number used in the model for a specified entity type. The available types are as follows.
Type |
Description |
t_ve |
Vertices |
t_ed |
Edges |
t_fa |
Faces |
t_vo |
Volumes |
t_gr |
Groups |
t_zn |
Zones |
t_cs |
Coordinate systems |
t_bl |
Boundary layers |
t_sz |
Size functions |
Format
LASTID(entity)
Examples
If the most recently created face in a model is labeled face.5, the following function call returns the value five (5) to the parameter X:
$X = LASTID(t_fa)
LISTENTITY returns a string array containing a filtered list of entities, zone definitions, coordinate systems, boundary layers, or size functions of a specified type currently existing in the model. For a list of available types, see the LASTID function, above.
The LISTENTITY function requires three arguments:
Format
LISTENTITY(return_type, filter_type, filter_entity)
Examples
The following function call returns a string array containing all edges associated with face.5.
$X = LISTENTITY(t_ed, t_fa, "face.5")The following function call returns an array containing all boundary layers in the model.
$X = LISTENTITY(t_bl)
LOC2ENT returns a string representing the name of the entity in closest proximity to a specified coordinate location. The LOC2ENT function requires four arguments:
Format
LOC2ENT(return_type, x, y, z)
Example
The following function call returns the name of the face entity closest to the point: x, y, z = 116,57,209.$X = LOC2ENT(t_fa, 116, 57, 209)
MINCLEARANCEMinimum Clearance
MINCLEARANCE returns a numeric array of six real values. The values constitute two sets of Cartesian coordinates at the points of minimum clearance for two entities of a specified type. The available types are as follows.
Type |
Description |
t_ve |
Vertices |
t_ed |
Edges |
t_fa |
Faces |
t_vo |
Volumes |
Format
MINCLEARANCE(entity_type, entity1, entity2)
Examples
If the shortest distance between two faces, labeled face.3 and face.10, can be represented by a straight line with the endpoint coordinates (0,1,0) on face.3 and (3,25,9) on face.10, the following function call returns the values 0, 1, 0, 3, 25, and 9 to elements 1 through 6, respectively, of array parameter X:
$X = MINCLEARANCE(t_fa, "face.3", "face.10")
NDEFAULTNumeric Default Value
NDEFAULT returns a numeric value that represents the current default value of a numeric GAMBIT default variable. For a complete list of GAMBIT default variables, see Section 6.1 of the GAMBIT Command Reference Guide.
Format
NDEFAULT(numeric_default)
Example
The following function call returns the current value of the GAMBIT default variable MESH.INTERVAL.COUNT.
$X = NDEFAULT("MESH.INTERVAL.COUNT")
OPERERR returns a numeric value of 0 or 1 to indicate whether or not the most recently attempted operation was successful.
Format
OPERERR()
Example
If the most recently attempted operation was unsuccessful, the following function call returns a numeric value of 1.$X = OPERERR()
PARAMSIZEParameter Array Size
PARAMSIZE returns a scalar value representing the size of a specified one-dimensional array parameter (parameter_name). (NOTE: The PARAMSIZE function does not apply to multiply dimensioned arrays and returns a value of zero (0) for scalars.)
Format
PARAMSIZE(parameter_name)
Example
The following function call returns the size of a parameter named, Y2.
$X = PARAMSIZE("Y2")
The QUALITY function returns the number of mesh elements the quality of which is above or below a specified value. It requires the following arguments:
Type |
Description |
q_area |
Area |
q_aspr |
Aspect ratio |
q_dgnr |
Diagonal ratio |
q_eask |
Equiangle skew |
q_edgr |
Edge ratio |
q_essk |
Equisize skew |
q_mask |
Midangle skew |
q_strc |
Stretch |
q_tapr |
Taper |
q_volu |
Volume |
q_warp |
Warpage |
The available direction values are as follows.
Type |
Description |
q_eq |
Quality metric equal to the specified value |
q_gt |
Quality metric greater than the specified value |
q_lt |
Quality metric less than the specified value |
Format
QUALITY(metric, direction, n, entity)
Example
The following function call returns the number of mesh elements in an entity named "volume.1" for which the aspect ratio metric is less than 0.65:
$X = QUALITY(q_aspr, q_lt, 0.65, "volume.1")
| NOTE: If you do not specify an entity argument, GAMBIT reports quality for all meshed entities in the model. |
RETLABELLast n'th Entity Name
RETLABEL returns the last nth entity name used in the model for a specified entity type. The available types are as follows.
Type |
Description |
t_ve |
Vertices |
t_ed |
Edges |
t_fa |
Faces |
t_vo |
Volumes |
t_gr |
Groups |
t_cs |
Coordinate systems |
t_bl |
Boundary layers |
t_sz |
Size functions |
Format
RETLABEL(entity_type, n)
Examples
If the second most recently created vertex in a model is labeled vertex.28, the following function call returns the string "vertex.28" to the parameter X:
$X = RETLABEL(t_ve, 2)
SDEFAULT returns a string value that represents the current default value of a GAMBIT string default variable. For a complete list of GAMBIT default variables, see Section 6.1 of the GAMBIT Command Reference Guide.
Format
SDEFAULT(string_default)
Example
The following function call returns the current value of the GAMBIT default variable LABEL.FACE.PREFIX.
$X = SDEFAULT("LABEL.FACE.PREFIX")
GAMBIT allows you to use two types of expressions in parameter definitions and journal files:
Arithmetic expressions evaluate to a numeric value and can be used wherever a numeric value is expected-for example, a keyword value, a data record entry, or a DO loop control variable. Logical expressions evaluate to true or false and are used in IF blocks and DO loops. (For descriptions of the use of IF blocks and DO loops in GAMBIT, see Appendix A.)
GAMBIT arithmetic expressions are of the form:
sA1 AOP sA2
where s is a sign (+ or -) and A1 and A2 are arithmetic expressions that are related to each other by means the arithmetic operator, AOP.
The following table lists valid arithmetic operators.
Symbol |
Operator |
+ |
Addition |
- |
Subtraction |
* |
Multiplication |
/ |
Division |
^ |
Exponentiation |
Operators may not be placed immediately adjacent to each other. Parentheses may be used to determine a hierarchy of operations or for clarity. When parentheses are not used the order of operations is ^, *, /, + and -.
The expressions A1 and A2 may consist of a numerical values, constants, functions, parameters, or other arithmetic expressions of the form sA1 AOP sA2. There is no limit to the level of nesting of arithmetic expressions. Examples of valid arithmetic expressions are as follows:
-5.0*SIN($a) 2*(PI+(TAN($x+5)/($y-5))) 3^3.5 + 4*$rad*RAD2DEG SQRT(2+MAX($a,$b))
Logical expressions consist of two types of operations:
Relational operations consist of comparisons made between arithmetic expressions. Logical operations consist of comparisons made between logical expressions.
The general syntax for GAMBIT relational operations is as follows:
A1 ROP A2
where A1 and A2 are arithmetic expressions, and ROP is a relational operator that defines the comparison between the expressions. The following table lists the valid relational operators available in GAMBIT.
ROP |
Description |
.GT. |
Greater than ( |
.GE. |
Greater than or equal to ( |
.LT. |
Less than ( |
.LE. |
Less than or equal to ( |
.EQ. |
Equal to (=) |
.NE. |
Not equal to ( |
The general syntax for GAMBIT logical operations is as follows:
L1 LOP L2
where L1 and L2 are arithmetic expressions, and LOP is a logical operator that defines the comparison between the expressions.
GAMBIT allows you to use any of the following logical operators: