| Arithmetic Operators | |
| Macros | |
| above | Greater than comparison. |
| above_eq | Greater than or equal comparison. |
| abs | Absolute value. |
| acos | Arc cosine. |
| asin | Arc sine. |
| atan | Arctangent. |
| atan2 | Arctangent division. |
| below | Less than comparison. |
| below_eq | Less than or equal comparison. |
| ceil | Round up to integral value. |
| compare | Comparison. |
| cos | Cosine. |
| cosh | Hyperbolic cosine. |
| cvt_to_object | Convert string to object. |
| exp | Exponential function. |
| fabs | Floating-point absolute value. |
| floor | Round down to integral value. |
| fmod | Floating-point remainder. |
| frexp | Extract mantissa and exponent. |
| isclose | Test for floating point equality. |
| isfinite | Test for finite value. |
| isinf | Test for infinity. |
| isnan | Test for a NaN. |
| ldexp | Multiply by a power of two. |
| log | Natural logarithm. |
| log10 | Base 10 logarithm function. |
| modf | Decompose a floating-point number. |
| pow | Raise to power. |
| sin | Sine function. |
| sinh | Hyperbolic sine function. |
| sqrt | Square root function. |
| tan | Tangent function. |
| tanh | Hyperbolic tangent function. |
| Functions | |
| ! | Not operator. |
| != | Non-equality operator. |
| % | Modulus operator. |
| %= | Modulus assignment operator. |
| & | Bitwise AND operator. |
| && | Logical AND operator. |
| &= | Bitwise AND assignment operator. |
| * | Multiplication operator. |
| *= | Multiplication assignment operator. |
| + | Addition operator. |
| ++ | Prefix Increment. |
| += | Addition assignment operator. |
| - | Subtraction operator. |
| -- | Prefix Decrement. |
| -= | Subtraction. |
| / | Division operator. |
| /= | Division assignment operator. |
| < | Less than comparison. |
| << | Left-shift operator. |
| <<= | Left-shift assignment operator. |
| <= | Less than or equal comparison. |
| <=> | Comparison operator. |
| = | Assignment operator. |
| == | Equality operator. |
| > | Greater than comparison. |
| >= | Greater than or equal comparison. |
| >> | Right-shift operator. |
| >>= | Right-shift assignment operator. |
| ^ | Bitwise exclusive OR operator. |
| ^= | Bitwise exclusive OR assignment operator. |
| post++ | Postfix Increment. |
| post-- | Postfix Decrement. |
| | | Bitwise OR operator. |
| |= | Bitwise OR assignment operator. |
| || | Logical OR operator. |
| ~ | Bitwise complement. |
int above( declare expr1, declare expr2 )
Greater than comparison.
The above() primitive is the functional form of the > operator.
The function yields the comparison of the two arguments expr1 and expr2 which both must be of equivalent types, either numeric or string; which are arithmetic and lexicographically comparisons respectively.
| expr1 | Left expression, numeric or string. |
| expr2 | Right expression, numeric or string. |
The above() primitive yields the value 1 if expr1 is greater then expr2, and 0 if the relation is false.
Lists can not be compared.
int above_eq( declare expr1, declare expr2 )
Greater than or equal comparison.
The above_eq() primitive is the functional form of the >= operator.
The function yields the comparison of the two arguments expr1 and expr2 which both must be of equivalent types, either numeric or string; which are arithmetic and lexicographically comparisons respectively.
| expr1 | Left expression, numeric or string. |
| expr2 | Right expression, numeric or string. |
The above_eq() primitive yields the value 1 if expr1 is greater then or equals expr2, and 0 if the relation is false.
float acos( float x )
Arc cosine.
The acos() primitive shall compute the principal value of the arc cosine of the argument x. The value of x should be in the range [-1,1].
The acos() primitive on successful completion shall return the arc cosine of xl, in the range [0,pi] radians.
Result on error are system dependent.
float asin( float x )
Arc sine.
The asin() primitive shall compute the principal value of the arc sine of the argument x. The value of x should be in the range [-1,1].
Upon successful completion shall return the arc sine of x, in the range [-pi/2,pi/2] radians.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
float atan( float x )
Arctangent.
The atan() primitive calculates the arctangent of x.
Returns a value in the range -pi/2 to pi/2 radians.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
float atan2( float y, float x )
Arctangent division.
The atan2() primitive calculate the arctangent (inverse tangent) of the operand division y/x.
The atan2() primitive returns a value in the range -pi to pi radians. If both arguments of atan2() are zero, the function sets errno to EDOM, and returns 0. If the correct value would cause underflow, zero is returned and the value ERANGE is stored in errno.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
int below( declare expr1, declare expr2 )
Less than comparison.
The below() primitive is the functional form of the < operator.
The function yields the comparison of the two arguments expr1 and expr2 which both must be of equivalent types, either numeric or string; which are arithmetic and lexicographically comparisons respectively.
| expr1 | Left expression, numeric or string. |
| expr2 | Right expression, numeric or string. |
The below() primitive yields the value 1 if expr1 is less than expr2, and 0 if the relation is false.
Lists can not be compared.
int below_eq( declare expr1, declare expr2 )
Less than or equal comparison.
The below_eq() primitive is the functional form of the <= operator.
The function yields the comparison of the two arguments expr1 and expr2 which both must be of equivalent types, either numeric or string; which are arithmetic and lexicographically comparisons respectively.
| expr1 | Left expression, numeric or string. |
| expr2 | Right expression, numeric or string. |
The below_eq() primitive yields the value 1 if expr1 is less then or equals expr2, and 0 if the relation is false.
Lists can not be compared.
float ceil( float x )
Round up to integral value.
The ceil() primitive computes the smallest integer that is greater than or equal to x.
Returns the calculated value as a double, float, or long double value.
If there is an overflow, the function sets errno to ERANGE and returns HUGE_VAL.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
int compare( expr1, expr2 )
Comparison.
The compare() primitive is the functional form of the <=> operator.
The function yields the comparison of the two arguments expr1 and expr2 which both must be of equivalent types, either numeric or string; which are arithmetic and lexicographically comparisons respectively.
| expr1 | Left expression. |
| expr2 | Right expression. |
The compare() primitive yields the value -1 if the first expression is less then the second, 0 if the equals, and 1 the greater than; which are arithmetic and lexicographically comparisons respectively.
Lists can not be compared.
float cos( float x )
Cosine.
The cos() primitive calculates the cosine of x. The value x is expressed in radians.
Returns the calculated value.
If x is outside prescribed limits, the value is not calculated. Instead, the function returns 0 and sets the errno to ERANGE.
If the correct value would cause an underflow, zero is returned and the value ERANGE is stored in errno.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
float cosh( float x )
Hyperbolic cosine.
The cosh() primitive calculates the hyperbolic cosine of x. The value x is expressed in radians.
Returns the calculated value.
If the result overflows, the function returns +HUGE_VAL and sets errno to ERANGE.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
declare cvt_to_object( string value, [int &length] )
Convert string to object.
The cvt_to_object() primitive converts the initial portion of the string specified string value into an underlying int, float or string object.
Then they shall attempt to convert the subject sequence to either a string, integer-constant or float-point constant, and return the result.
If the value of base is 0, the expected form of the subject sequence is that of a decimal constant, octal constant, or hexadecimal constant, any of which may be preceded by a + or - sign.
A decimal constant begins with a non-zero digit, and consists of a sequence of decimal digits.
An octal constant consists of the prefix 0 optionally followed by a sequence of the digits 0 to 7 only.
A binary constant consists of the prefix 0b or 0B followed by a sequence of the decimal digits 0 or 1.
A hexadecimal constant consists of the prefix 0x or 0X followed by a sequence of the decimal digits and letters a (or A ) to f (or F ) with values 10 to 15 respectively.
A floating-point number should have the form “SI.FESX” containing at least a fractional value or exponent, where
Either I or F may be omitted, or both. The decimal point isn’t necessary unless F is present.
A character sequence INF or INFINITY, ignoring case, shall be interpreted as an infinity; if representable.
A character sequence NAN shall be interpreted as a quiet NaN, ignoring case, shall be interpreted as an Quiet Not-A-Number; if representable.
int
parsetoken(string line)
{
declare x;
int len;
x = cvt_to_object(line, len);
switch (typeof(x)) {
case "integer": // integer constant.
break;
case "float": // floating point constant.
break;
case "string": // string constant.
break;
default:
// error condition
break;
}
return len;
}
| value | String value to be parsed. |
| length | Optional integer variable reference, if specified shall be populated with the number of characters consumed within the source string, including all consumed leading characters, for example white-space. Upon a parse error the populated length shall be 0. |
The cvt_to_object() primitive returns the value of the parsed object converted to the most suitable type, either as an int, float or string type.
Otherwise if the string cannot be parsed NULL is returned.
n/a
float exp( float x )
Exponential function.
The exp() primitive calculates the exponent of x, defined as e**x, where e equals 2.17128128....
If successful, the function returns the calculated value.
If an overflow occurs, the function returns HUGE_VAL. If an underflow occurs, it returns 0. Both overflow and underflow set errno to ERANGE.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
float floor( float x )
Round down to integral value.
The floor() primitive calculates the largest integer that is less than or equal to x.
Returns the calculated integral value expressed as a double, float, or long double value. The result cannot have a range error.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
float fmod( float x, float y )
Floating-point remainder.
The fmod() primitive Calculates the floating-point remainder of x/y. The absolute value of the result is always less than the absolute value of y. The result will have the same sign as x.
If successful, the function returns the floating-point remainder of x/y.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
Dependent on the implementation if y is 0 one of two may occur,
No other errors will occur.
float frexp( float num, int & exp )
Extract mantissa and exponent.
The frexp() primitive breaks a floating-point number num into a normalised fraction and an integral power of 2. It stores the integer exponent in the int object exp.
An application wishing to check for error situations should set errno to 0 before calling frexp(). If errno is non-zero on return, or the return value is NaN, an error has occurred.
The frexp() primitive returns the value x, such that x is a double with magnitude in the interval [0.5, 1) or 0, and num equals x times 2 raised to the power exp.
If num is 0, both parts of the result are 0.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
int isclose( float v1, float v2, float ~rel_tot, float ~abs_tol )
Test for floating point equality.
The isclose() primitive determines whether two floating point numbers are close in value.
| v1 | First string. |
| v2 | Second value to compare against. |
| rel_tol | Optional value, used for relative tolerance. |
| abs_tol | Optional value, used for the minimum absolute tolerance. |
The isclose() primitive returns a non-zero value if v1 is close in value to v2, otherwise zero or -1 on error.
A GriefEdit extension.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
int isfinite( float val )
Test for finite value.
The isfinite() primitive shall determine whether its argument has a finite value (zero, subnormal, or normal, and not infinite or NaN).
The isfinite() primitive shall return a non-zero value if and only if its argument has a finite value.
A GriefEdit extension.
int isinf( float val )
Test for infinity.
The isinf() primitive shall determine whether its argument has a finite value (zero, subnormal, or normal, and not infinite or NaN).
The isinf() primitive shall return a non-zero value if and only if its argument has an infinite value.
A GriefEdit extension.
int isnan( float val )
Test for a NaN.
The isnan() primitive tests the specified floating-point value val, returning a nonzero value if val is a not a number (NaN).
A NaN is generated when the result of a floating-point operation cannot be represented in Institute of Electrical and Electronics Engineers (IEEE) format.
On systems not supporting NaN values, isnan() always returns 0.
Non-zero if NaN, otherwise 0.
A GriefEdit extension.
float ldexp( float val, int exp )
Multiply by a power of two.
The ldexp() primitive calculates the value of x*(2^exp).
This is x multiplied by 2 to the power of exp.
Returns the calculated value.
Otherwise, if the correct calculated value is outside the range of representable values, -/+HUGE_VAL is returned, according to the sign of the value. The value ERANGE is stored in errno to indicate that the result was out of range.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
float log( float x )
Natural logarithm.
The log() primitive calculates the natural logarithm (base e) of x, for x greater than 0.
Returns the computed value.
If x is negative, the function sets errno to EDOM and returns -HUGE_VAL. If x is 0.0, the function returns -HUGE_VAL and sets errno to ERANGE.
If the correct value would cause an underflow, 0 is returned and the value ERANGE is stored in errno.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
float log10( float val )
Base 10 logarithm function.
The log10() primitive calculates the base 10 logarithm of the positive value of x.
Returns the computed value.
If x is negative, the function sets errno to EDOM and returns -HUGE_VAL. If x is 0.0, the function returns -HUGE_VAL and sets errno to ERANGE.
If the correct value would cause an underflow, 0 is returned and the value ERANGE is stored in errno.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
float modf( float num, float & mod )
Decompose a floating-point number.
The modf() primitive breaks the argument num into integral and fractional parts, each of which has the same sign as the argument. It stores the integral part as a double in the object mod.
An application wishing to check for error situations should set errno to 0 before calling modf(). If errno is non-zero on return, or the return value is NaN, an error has occurred.
Upon successful completion, modf() returns the signed fractional part of num.
If num is NaN, NaN is returned, errno may be set to EDOM.
If the correct value would cause underflow, 0 is returned and errno may be set to ERANGE.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
float pow( float x, float y )
Raise to power.
The pow() primitive returns x raised to the power of y.
Returns the computed value.
If y is 0, the function returns 1.
If x is negative and y is non-integral, the function sets errno to EDOM and returns -HUGE_VAL. If the correct value is outside the range of representable values, +HUGE_VAL is returned according to the sign of the value, and the value of ERANGE is stored in errno.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
float sin( float val )
Sine function.
The sin() primitive computes the sine of the argument ‘val, measured in radians.
Upon successful completion, shall return the sine of x.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
float sinh( float val )
Hyperbolic sine function.
The sinh() primitive computes the hyperbolic sine of the argument val.
Upon successful completion, shall return the hyperbolic sine of x.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
float sqrt( float val )
Square root function.
The sqrt() primitive computes the square root of the argument val.
Upon successful completion, shall return the square root of val.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
float tan( float val )
Tangent function.
The tan() primitive computes the tangent of the argument val, measured in radians.
Upon successful completion, shall return the tangent of val.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
float tanh( float val )
Hyperbolic tangent function.
The tanh() primitive computes the hyperbolic tangent of the argument val.
Upon successful completion, shall return the hyperbolic tangent of x.
Result on error are system dependent; where supported errno shall be set to a non-zero manifest constant describing the error.
!expr
Not operator.
The ! operator yields the logical not of the expression expr.
If the operand has the value zero, then the result value is 1.
If the operand has some other value, then the result is 0.
| expr | Expression. |
Returns the logical not of the expression expr. expr must evaluate to an integer expression.
expr1 != expr2
Non-equality operator.
The != operator compares for inequality, yielding the value 1 if the relation is true, and 0 if the relation is false. The result type is int.
| expr1 | Left expression. |
| expr2 | Right expression. |
The accumulator shall be set to the result of the comparison.
Lists can not be compared.
expr1 % expr2
Modulus operator.
The % operator yields the remainder from the division of the first operand by the second operand. The operands of must have numeric types.
| expr1 | Left expression. |
| expr2 | Right expression. |
The accumulator shall be set to the result of the computation.
var %= expr1
Modulus assignment operator.
The %= operator takes the modulus of the first operand var specified by the value of the second operand expr1, storing the result in the object specified by the first operand var.
| var | A numeric scalar type. |
| expr1 | A numeric expression. |
The accumulator shall be set to the result of the assignment.
expr1 & expr2
Bitwise AND operator.
The & operator yields the result is the bitwise AND of the two operands expr1 and expr2. That is, the bit in the result is set if and only if each of the corresponding bits in the operands are set.
| expr1 | Left expression. |
| expr2 | Right expression. |
The accumulator shall be set to the result of the computation.
expr1 && expr2
Logical AND operator.
The && operator performs a logic AND between the two expressions expr1 and expr2.
Each of the operands must have scalar type. If both of the operands are not equal to zero, then the result is 1. Otherwise, the result is zero. The result type is int.
Logical operators are executed using short-circuit semantics whereby the second argument is only executed or evaluated if the first argument does not suffice to determine the value of the expression:
var &= expr1
Bitwise AND assignment operator.
The &= operator obtains the bitwise AND of the first operand var and second operand expr1, storing the result in the object specified by the first operand var.
| var | A numeric scalar type. |
| expr1 | A numeric expression. |
The accumulator shall be set to the result of the assignment.
exp1 * expr2
Multiplication operator.
The * operator yields the product of its operands expr1 and expr2. The operands must have numeric types.
| expr1 | Left numeric expression. |
| expr2 | Right numeric expression. |
The accumulator shall be set to the result of the computation.
If either number is NaN, the result is NaN. Multiplication of Infinity by zero gives a result of NaN, while multiplying Infinity by any non-zero number gives a result of Infinity.
var *= expr1
Multiplication assignment operator.
The *= operator multiplies the value of the first operand var by the value of the second operand expr1; store the result in the object specified by the first operand var.
| var | Any scalar type. |
| expr1 | A numeric expression. |
The accumulator shall be set to the result of the assignment.
expr1 + expr2
Addition operator.
The + operator yields the sum of its operands resulting from the addition of the first operand with the second.
If ‘expr1 or expr2 is a list, then a new list is returned which is the concatenation of expr1 and expr2.
If expr1 or expr2 is a string, then the other operand is converted to a string, and a string is returned.
If either operand is a floating point number then the other the result is the sum of the two expressions.
Otherwise the integer value of the sum of the two expressions is returned.
| expr1 | Left expression. |
| expr2 | Right expression. |
The accumulator shall be set to the result of the computation.
A list value if either operand is a list; a string if either operand is a string; a float if either operand is a float; otherwise an integer value.
var += expr1
Addition assignment operator.
The += operator adds the value of the second operand to the value of the first operand var, storing the result in the object specified by the first operand var.
| var | Any scalar type. |
| expr1 | An expression resulting in value of the same type as the scalar type var. |
The accumulator shall be set to the result of the assignment.
var -= expr1
Subtraction.
The -= operator subtracts the value of the second operand expr1 from the value of the first operand var, storing the result in the object specified by the first operand var.
| var | A numeric scalar type. |
| expr1 | A numeric expression. |
The accumulator shall be set to the result of the assignment.
expr1 / expr2
Division operator.
The / operator yields the quotient from the division of the first operand by the second operand. The operands must have numeric types.
| expr1 | Left numeric expression. |
| expr2 | Right numeric expression. |
The accumulator shall be set to the result of the computation.
If number1 is a finite, non-zero number, and number2 is zero, the result of the division is Infinity if the number1 is positive, and -Infinity if negative. If both number1 and number2 are zero, the result is NaN.
var /= expr1
Division assignment operator.
The /= operator divides the value of the first operand var by the value of the second operand expr1, storing the result in the object specified by the first operand var.
| var | A numeric scalar type. |
| expr1 | A numeric expression. |
The accumulator shall be set to the result of the assignment.
expr1 << expr2
Left-shift operator.
The << operator shift the value of the first operand expr1 left the number of bits specified by the value of the second operand expr1.
Both operands must have an integral type, and the integral promotions are performed on them. The type of the result is the type of the promoted left operand.
| expr1 | Left expression. |
| expr2 | Right expression. |
The accumulator shall be set to the result of the computation.
var <<= expr1
Left-shift assignment operator.
The <<= operator shift the value of the first operand var left the number of bits specified by the value of the second operand expr1, storing the result in the object specified by the first operand var.
| var | A numeric scalar type. |
| expr1 | A numeric expression. |
The accumulator shall be set to the result of the assignment.
expr1 <=> expr2
Comparison operator.
The <=> operator yields the value -1 if the first expression is less then the second, 0 if the equals, and 1 the greater than; which are arithmetic and lexicographically comparisons respectively.
| expr1 | Left expression. |
| expr2 | Right expression. |
The accumulator shall be set to the result of the comparison.
Lists can not be compared.
var = expr1
Assignment operator.
The = operator applies simple assignment, in which the value of the second operand expr1 is stored in the object specified by the first operand var.
| var | Any scalar type. |
| expr1 | An expression resulting in value of the same type as the scalar type var. |
The accumulator shall be set to the result of the assignment.
expr1 == expr2
Equality operator.
The == operator compares for equality, yielding the value 1 if the relation is true, and 0 if the relation is false. The result type is int.
| expr1 | Left expression. |
| expr2 | Right expression. |
The accumulator shall be set to the result of the comparison.
Lists can not be compared.
expr1 >> expr2
Right-shift operator.
The >> operator shift the value of the first operand expr1 right the number of bits specified by the value of the second operand expr1.
Both operands must have an integral type, and the integral promotions are performed on them. The type of the result is the type of the promoted left operand.
| expr1 | Left expression. |
| expr2 | Right expression. |
The accumulator shall be set to the result of the computation.
var >>= expr1
Right-shift assignment operator.
The >>= operator shift the value of the first operand var right the number of bits specified by the value of the second operand expr1, storing the result in the object specified by the first operand var.
| var | A numeric scalar type. |
| expr1 | A numeric expression. |
The accumulator shall be set to the result of the assignment.
expr1 ^ expr2
Bitwise exclusive OR operator.
The ^ operator yields the result is the bitwise exclusive OR of the two operands.
That is, the bit in the result is set if and only if exactly one of the corresponding bits in the operands are set.
| expr1 | Left expression. |
| expr2 | Right expression. |
The accumulator shall be set to the result of the computation.
var ^= expr1
Bitwise exclusive OR assignment operator.
The ^= operator obtains the bitwise exclusive OR of the first operand var and second operand expr1, storing the result in the object specified by the first operand var.
| var | A numeric scalar type. |
| expr1 | A numeric expression. |
The accumulator shall be set to the result of the assignment.
expr++
Postfix Increment.
The post++ operator increments the operand expr by 1, with the original value prior to the operation returned.
In other words, the original value of the operand is used in the expression, and then it is incremented.
| expr | An expression. |
The accumulator shall be set to orginal value of expr prior to being incremented.
expr--
Postfix Decrement.
The post-- operator decrements the operand expr by 1, with the original value prior to the operation returned.
In other words, the original value of the operand is used in the expression, and then it is decremented.
| expr | An expression. |
The accumulator shall be set to orginal value of expr prior to being decremented.
expr1 | expr2
Bitwise OR operator.
The | operator yields the result is the bitwise inclusive OR of the two operands expr1 and expr2. That is, the bit in the result is set if at least one of the corresponding bits in the operands is set.
| expr1 | Left expression. |
| expr2 | Right expression. |
The accumulator shall be set to the result of the computation.
var |= expr1
Bitwise OR assignment operator.
The |= operator obtains the bitwise inclusive OR of the first operand var and second operand var, storing the result in the object specified by the first operand var.
| var | A numeric scalar type. |
| expr1 | A numeric expression. |
The accumulator shall be set to the result of the assignment.
expr1 || expr2
Logical OR operator.
The || operator performs a logic OR between the two expressions expr1 and expr2.
Each of the operands must have scalar type. If one or both of the operands is not equal to zero, then the result is 1. Otherwise, the result is zero (both operands are zero). The result type is int.
Logical operators are executed using short-circuit semantics whereby the second argument is only executed or evaluated if the first argument does not suffice to determine the value of the expression:
~expr
Bitwise complement.
The ^ operator yields the bitwise complement 1’s complement or bitwise not operator of expr.
The type of the operand must be an integral type, and integral promotion is performed on the operand. The type of the result is the type of the promoted operand.
Each bit of the result is the complement of the corresponding bit in the operand, effectively turning 0 bits to 1, and 1 bits to 0. The ! symbol is the logical not operator. Its operand must be a scalar type (not a structure, union or array). The result type is int.
If the operand has the value zero, then the result value is 1.
If the operand has some other value, then the result is 0.
| expr | Expression. |
The accumulator shall be set to the result of the computation.
$Id: $
To send feedback on this topic email: griefedit@gmail.com
Copyright © Adam Young All Rights Reserved.
Greater than comparison.
int above( declare expr1, declare expr2 )
Greater than or equal comparison.
int above_eq( declare expr1, declare expr2 )
Absolute value.
int abs( int val )
Arc cosine.
float acos( float x )
Arc sine.
float asin( float x )
Arctangent.
float atan( float x )
Arctangent division.
float atan2( float y, float x )
Less than comparison.
int below( declare expr1, declare expr2 )
Less than or equal comparison.
int below_eq( declare expr1, declare expr2 )
Round up to integral value.
float ceil( float x )
Comparison.
int compare( expr1, expr2 )
Cosine.
float cos( float x )
Hyperbolic cosine.
float cosh( float x )
Convert string to object.
declare cvt_to_object( string value, [int &length] )
Exponential function.
float exp( float x )
Floating-point absolute value.
float fabs( float x )
Round down to integral value.
float floor( float x )
Floating-point remainder.
float fmod( float x, float y )
Extract mantissa and exponent.
float frexp( float num, int & exp )
Test for floating point equality.
int isclose( float v1, float v2, float ~rel_tot, float ~abs_tol )
Test for finite value.
int isfinite( float val )
Test for infinity.
int isinf( float val )
Test for a NaN.
int isnan( float val )
Multiply by a power of two.
float ldexp( float val, int exp )
Natural logarithm.
float log( float x )
Base 10 logarithm function.
float log10( float val )
Decompose a floating-point number.
float modf( float num, float & mod )
Raise to power.
float pow( float x, float y )
Sine function.
float sin( float val )
Hyperbolic sine function.
float sinh( float val )
Square root function.
float sqrt( float val )
Tangent function.
float tan( float val )
Hyperbolic tangent function.
float tanh( float val )
Not operator.
!expr
Non-equality operator.
expr1 != expr2
Modulus operator.
expr1 % expr2
Modulus assignment operator.
var %= expr1
Bitwise AND operator.
expr1 & expr2
Logical AND operator.
expr1 && expr2
Bitwise AND assignment operator.
var &= expr1
Multiplication operator.
exp1 * expr2
Multiplication assignment operator.
var *= expr1
Addition operator.
expr1 + expr2
Prefix Increment.
++expr
Addition assignment operator.
var += expr1
Subtraction operator.
expr1 - expr2
Prefix Decrement.
--expr
Subtraction.
var -= expr1
Division operator.
expr1 / expr2
Division assignment operator.
var /= expr1
Less than comparison.
expr1 < expr2
Left-shift operator.
expr1 << expr2
Left-shift assignment operator.
var <<= expr1
Less than or equal comparison.
expr1 <= expr2
Comparison operator.
expr1 <=> expr2
Assignment operator.
var = expr1
Equality operator.
expr1 == expr2
Greater than comparison.
expr1 > expr2
Greater than or equal comparison.
expr1 >= expr2
Right-shift operator.
expr1 >> expr2
Right-shift assignment operator.
var >>= expr1
Bitwise exclusive OR operator.
expr1 ^ expr2
Bitwise exclusive OR assignment operator.
var ^= expr1
Postfix Increment.
expr++
Postfix Decrement.
expr--
Bitwise OR operator.
expr1 | expr2
Bitwise OR assignment operator.
var |= expr1
Logical OR operator.
expr1 || expr2
Bitwise complement.
~expr
Declare a polymorphic symbol.
declare sym1, sym2 ...;
Declare an integer symbol.
int sym1, sym2 ...;
Declare a float symbol.
float sym1, sym2 ...;
Declare a string symbol.
string sym1, sym2 ...;
Convert string to a decimal number.
int atoi( string str, [int svalue = TRUE] )
String to double.
int strtod( string str, [int &endofoffset] )