Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Performance issue

Former Member
0 Likes
462

Hi,

Which one give the better performance Macros or Subrountines.

Regards,

Suresh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
439

hi,

Both are one and the Same. Only difference is You cannot debbug the Macro.

2 REPLIES 2
Read only

Former Member
0 Likes
440

hi,

Both are one and the Same. Only difference is You cannot debbug the Macro.

Read only

Former Member
0 Likes
439

Macros can only be used in the program the are defined in and only after the definition.

Macros can take max 9 parameters.

Macros are expanded at compilation / generation.

Subroutines (FORM) can be called from both the program the are defined in and other programs ('perform

' of 'perform in program ').

Subroutines can take any amount of parameters.

Subroutines are 'expanded' at runtime.

In general:

A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice.

A FORM is a local subroutine (which can be called external).

A FUNCTION is (more or less) a subroutine that is called external.

Since debugging a MACRO is not really possible, prevent the use of them (I've never used them, but seen them in action). 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.

there shud be no difference performance wise. use it the way prefred according to your req with the difference stated above

reg

Ramya

Edited by: Ramya S on Jan 2, 2009 7:29 AM