Ax51 User's GuideAx51 Introduction Assembling Programs Writing Assembly Programs Control Statements Macro Processor Standard Macro Processor Standard Macro Controls Defining Standard Macros Calling Standard Macros Local Symbols Exiting a Macro Built-in Macros REPT IRP IRPC Standard Macro Operators NUL Operator & Operator < and > Operators % Operator ;; Operator ! Operator MPL Macro Processor MPL Macro Overview MPL Meta Character Defining MPL Macros Calling MPL Macros Local Symbols Expressions Common Functions Bracket Function Comment Function Escape Function METACHAR Function SET Function EVAL Function Comparison Functions Conditional Functions EXIT Function IF Function REPEAT Function WHILE Function Console I/O Functions String Functions LEN Function MATCH Function SUBSTR Function Advanced Literal Delimiters Blank Delimiters Identifier Delimiters Literal and Normal Modes C Preprocessor Exceptions Side-Effects Predefined Macros Examples Error Messages Appendix
The MPL macro processor interprets balanced text strings as numeric expressions when they are used arguments to the following MPL functions:
Numeric expressions are processed as follows:
The following operators may be used in numeric expressions:
Arithmetic on MPL numeric expressions is performed using signed 16-bit integers. The result of relational operators is either 0 (FALSE) or 1 (TRUE).
Numbers may be specified in hexadecimal (base 16), decimal (base 10), octal (base 8), and binary (base 2) using the suffix and character specified in the following table:
A number with no explicit base is interpreted as a decimal number. The first character of a number must always be a digit (0-9). Hexadecimal numbers that do not have a digit as the first character — that is, if they have A-F in that position — must be prefixed with a 0.
Dollar sign characters ('$') may be used within numbers to make them more readable. However, the dollar sign may not be the first or last character of a number. For example:
Hexadecimal numbers may be entered using C language conventions.
The MPL macro processor supports ASCII character strings which may consist of one or two characters enclosed in single quotes ("'"). For example:
of your data.