Useful functions
function(arguments)
- Argument
- Example
- Blank
- function( )
- Constant
- function(55)
- Symbol
- function(#5)
- Literal string
- function('With a literal string')
- Option recognized by function
- function(option)
- Another function
- function(function(arguments))
- Combination of argument types
- function('Literal string', #5, option)
- ABS()
- Returns the absolute value of a number. For example, to select records in which field
#12
contains a value in the range -10 to +10, specify:ABS(#12) <= 10
- MAX()
- Returns the largest number from the list specified. For example, to select records in which any of fields
#10, #11,
or#12
contains a value greater than 55, specify:MAX(#10, #11, #12) > 55
- MIN()
- Returns the smallest number from the list specified. For example, to select records in which any of fields
#10, #11,
or#12
contains a value less than 0, specify:MIN(#10, #11, #12) < 0
- POS()
-
Returns the position of one string, needle, in another, haystack. Returns 0 if needle is a null string, or is not found in haystack, or if start is greater than the length of haystack. By default, the search starts at the first byte of haystack (that is, the value of start is 1). You can override this by specifying start (which must be a positive whole number), the point at which the search starts. For example, to select records in which any character in field
#22
is a blank, specify:POS(' ',#22) > 0
- SUBSTR()
-
Returns the substring of string that begins at the nth byte and is of length length bytes, padded with pad if necessary. n is a positive whole number. If n is greater than the length of string (in bytes), only pad characters are returned.
If you omit length, the rest of the string is returned. The default pad character is a blank.
For example, to select records in which bytes 4-6 of field#22
are the string 'NOT', specify:SUBSTR(#22,4,3) = 'NOT'