Language Elements |
Top Previous Next |
The DScript language resembles SQL and uses the following expressions to operate on conditions or data.
Arithmetic operatorsThe +, -, * and / characters are used to calculate values.
Assignment operatorDepending on context, the = character is used as the assignment operator for settings variables to a specific value.
Concatenation operatorThe || ("double-pipe") operator is used to concatenate strings. Using 'value1' || 'value2' in code, results in a single string value of 'value1value2'.
Logical operatorsYou can use NOT, AND and OR in combination in search conditions to create complex conditions.
Comparison operatorsThe =, <>, <, <=, >, >= symbols are used for comparing values.
Constant or LiteralString literals in single quotes, integer and floating point numbers and NULL. When written directly in the script, these are basically constants.
There's additional special literals, like the hex-string, a binary string made up of pairs of hex digits each defining a single byte. There's also the hexadecimal notation for number, which looks similar.
Date/time literalSpecific date, time or date-time literals are strings in single quotes, with a DATE, TIME, DATETIME or TIMESTAMP prefix.
IdentifierAn object identifier is a string without single quotes but optionally with double quotes. When an object identifier is double quoted ("MyName"), the text becomes case sensitive. If you have special characters in an object name, like a space, the double quotes are required.
Statement separatorStatements are separated (or ended) by the semi-colon character: ;
Sub-routineA locally declared subroutine inside a scripting block.
VariableA local variable or an input or output parameter for the current scripting block or local subroutine. |