This topic describes the syntax, features, parameters, and return values of logical functions. This topic also provides examples of these functions.
and
Item | Description |
---|---|
Syntax | and(arg, ...)
|
Description |
|
Parameter | The value that you want to check. You can specify one or more values. Data type: any type. |
Return value | Returns true if all values evaluate to true and returns false if a value evaluates to false.
|
Example |
|
or
Item | Description |
---|---|
Syntax | or(arg, ...)
|
Description |
|
Parameter | The value that you want to check. You can specify one or more values. Data type: any type. |
Return value | Returns true if a value evaluates to true and returns false if all values evaluate to false.
|
Example |
|
not
Item | Description |
---|---|
Syntax | not(arg)
|
Description | Executes the NOT logical operator. The values of undef and false evaluate to false, and other values evaluate to true.
|
Parameter | The value that you want to check. You can specify only one value. Data type: any type. |
Return value |
|
Example |
|
eq
Item | Description |
---|---|
Syntax | eq(arg1, arg2)
|
Description | Compares whether two values are equal. |
Parameter |
|
Return value | Returns true if the two values are equal and returns false if they are not equal.
|
Example |
|
ne
Item | Description |
---|---|
Syntax | ne(arg1, arg2)
|
Description | Compares whether two values are not equal. |
Parameter |
|
Return value | Returns true if the two values are not equal and returns false if they are equal.
|
Example |
|
null
Item | Description |
---|---|
Syntax | null(v)
|
Description | Checks whether a data type is specified for AScript. |
Parameter | v: the parameter to pass. Data type: array, dictionary, or string. A value of false is returned for other data types. |
Return value | Data type: Boolean.
|
Example | Output:
|