This chapter describes the denotation used in description of macro-language
Basic Denotation:
- {def_name}- Name of a macro, case-sensitive identifier, can contain characters: a..z, A..Z, 0..9, _ and cannot start with a number
- {text} - Text to the end of line
- {number} - Decimal number
- {string} - String inside quotation marks, ""
- {def_list} - Name of a macro that contains list of items
- {filename} - Name of external file with relative path
- {eventname} - Name of any event of the component
Operator: {operator} is
- = assignment (the same as command
%define!)
- += addition
- -= substraction
- /= division
- \= integer division (integer operation)
- %= modulo (integer operation)
- *= multiplication
- |= bit or (integer operation)
- &= bit and (integer operation)
- ~= bit xor (integer operation)
- >= bit shift to the right (integer operation)
- <= bit shift to the left (integer operation)
- ^= power of
- $= round, returns closest integer number
- .= truncate
- @= exponent,(8@=2 returns 3)
Condition: {condition} is
- {condvalue} is {def_name} or {string} or element from list
- {condition} is
- defined({def_name}) condition is true if macro {def_name} is defined
- ndefined() condition is true if macro {def_name} is not defined
- ({condvalue} = {condvalue}) string compare
- ({condvalue} <> {condvalue}) string compare
- ({condvalue} != {condvalue}) string compare
- ({condvalue} > {condvalue}) string compare
- ({condvalue} < {condvalue}) string compare
- ({condvalue} >= {condvalue}) string compare
- ({condvalue} <= {condvalue}) string compare
- ({condvalue} >N {condvalue})
- ({condvalue} <N {condvalue})
- ({condvalue} >=N {condvalue})
- ({condvalue} <=N {condvalue})
if N is number 1...9 then strings are formatted to length N characters - there are inserted spaces to the begin of string or end of string is cuted. Strings are compared after the formatting.
if N is number 0 then strings are formatted to the same length - to the begin of shorter string are inserted spaces. Strings are compared after the formatting.
if N is decimal point then strings are converted to real number and these numbers are compared.
- ({condvalue} =^ {condvalue}) string compare, {condvalue} are converted to uppercase before compare.
- ({condition} | {condition}) logical or. If the first {condition} is true then the result is true.
- {condition} & {condition} logical and. If the first {condition} is false then the result is false.
- for_last condition is true if the actual for variable is the last from list
- ({string} in {def_list}) condition is true when {string} is element of list {def_list}. {def_list} is name of variable.