Macros


Describe the Difference Between Macro and Subroutine?
Can you highlight the differences between Macro and Subroutine?

Macros can only be used in the program they are defined in and only after the definition are expanded at compilatio/ generation. A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice.Since debugging a MACRO is not really possible, prevent the use of them (I’ve never used them, but seen them in action).
Subroutines (FORM) can be called from both the program they are defined in and other programs. A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a subroutine that is called external. If the subroutine is used only local (called internal) use a FORM. If the subroutine is called external (used by more than one program) use a FUNCTION.