This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MPL RADIX

Hello,

is it possible to set the output radix of MPL of A166
from hex to decimal?
Currently this code

%SET (VAL,10)
val_text:	db	'%VAL'
label%VAL:
is expanded to
val_text:	db	'0AH'
label0AH: 
instead of
val_text:	db	'10'
label10: 

I haven't found any RADIX command for MPL in the documentation.
In the A166 manual all MPL examples are shown in decimal
notation.

- Heinz

Parents
  • Hello Jon,

    meanwhile I found out that SET is internally defined as

    %*DEFINE(SET(N,V)) (%DEFINE(%N)(%EVAL(%V)))
    
    Eval is the MPL function that converts the string argument V to a numeric value.
    The manual describes the EVAL function as
    The macro-processor function EVAL accepts an expression as an argument and returns the decimal character representation of its result.

    But it returns the hex representation and not the decimal. The question is: is it possible to change this behavior by an option or command line switch?

    - Heinz

Reply
  • Hello Jon,

    meanwhile I found out that SET is internally defined as

    %*DEFINE(SET(N,V)) (%DEFINE(%N)(%EVAL(%V)))
    
    Eval is the MPL function that converts the string argument V to a numeric value.
    The manual describes the EVAL function as
    The macro-processor function EVAL accepts an expression as an argument and returns the decimal character representation of its result.

    But it returns the hex representation and not the decimal. The question is: is it possible to change this behavior by an option or command line switch?

    - Heinz

Children