EVAL

EVAL.html
hide random home http://www.mentasm.com/~mramiga/c/eval.html (Amiga Plus Extra No. 5/97, 05/1997)


Format:    EVAL (value1) {[(operation)] [(value2)]} [TO (file)] [LFORMAT=(string)]
Template:  VALUE1/A,OP/VALUE2/M,TO/K,LFORMAT/K
Location:  C: 

EVAL is used to evaluate and print the answer as an integer expression. The fraction portion of input values and final results, if any, is cut off. If a non-integer is given as an input value, evaluation stops at the decimal point.

(value1) and (value2) can be decimal (default), hexadecimal, or leading 0x or #x. Octal numbers are indicated by either a leading 0 or #. Alphabetical characters are indicated by a leading single quotation mark (') and are evaluated as their ASCII equivalent.

The LFORMAT keyword specifies the formatting string used to print the answer. You can use %X (hex), %O (octal), %N ( decimal), or %C (character). When using the LFORMAT keyword, you can specify to print a new line by including *N in your string.

Supported operations and corresponding symbols are shown below.


Example: