Page 109 - DCAP507_SYSTEM_SOFTWARE
P. 109

Unit 7: Macro Language




              For the first macro expansion in a program, xx will have the value AA. For subsequent  Notes
               macro expansions, xx will be set to AB, AC, etc.

          7.2.3 Conditional Macro Expansion


              Arguments in macro invocation can be utilized to:
                   Replace  the  parameters  in  the  macro body  without  varying  the sequence  of
                    statements expanded.

                   Amend the sequence of statements for  conditional macro expansion (or conditional
                    assembly when related to assembler).
               This capability adds greatly to the power and flexibility of a macro language.


                 Example: Consider the example














































              Two additional parameters utilized in the example of conditional macro expansion:

                   &EOR: signifies a hexadecimal character code that marks the end of a record.
                   &MAXLTH: signifies the maximum length of a record.






                                           LOVELY PROFESSIONAL UNIVERSITY                                   103
   104   105   106   107   108   109   110   111   112   113   114