2007 Apr 18 6:16 AM
DATA: result TYPE i,
n1 TYPE i VALUE 5,
n2 TYPE i VALUE 6.
DEFINE operation.
result = &1 &2 &3.
output &1 &2 &3 result.
END-OF-DEFINITION.
DEFINE output.
write: / 'The result of &1 &2 &3 is', &4.
END-OF-DEFINITION.
operation 4 + 3.
operation 2 ** 7.
operation n2 - n1.
2007 Apr 18 6:26 AM
hi,
you have created two Macros operation and output.
and then when you execute the below code their respective macros will get executed
operation 4 + 3.
operation 2 ** 7.
operation n2 - n1.
for example : operation 4 + 3. will execute operator macro in which it Contains the output macro and the result will be displayed.
regards,.
santosh.
hi,
you have created two Macros operation and output.
and then when you execute the below code their respective macros will get executed
operation 4 + 3.
operation 2 ** 7.
operation n2 - n1.
for example : operation 4 + 3. will execute operator macro in which it Contains the output macro and the result will be displayed.
regards,.
santosh.
2007 Apr 18 6:18 AM
Hi,
DATA: result TYPE i,
n1 TYPE i VALUE 5,
n2 TYPE i VALUE 6.
<b>This is macro definition.</b>
DEFINE operation.
result = &1 &2 &3. <b>"&1 &2 &3 are place holders</b>
output &1 &2 &3 result. " <b>Calling the macro output</b>
END-OF-DEFINITION.
<b>This is another macro (output) definition</b>
DEFINE output.
write: / 'The result of &1 &2 &3 is', &4. " <b>4 place holders passed to this macro</b>
END-OF-DEFINITION.
<b>*Clling the macro operation 3 times with three different *operation( addition, power, subtraction )</b>operation 4 + 3.
operation 2 ** 7.
operation n2 - n1.
Regards,
2007 Apr 18 6:19 AM
2007 Apr 18 6:21 AM
Hi srinivas..
that is a macro for which u r passing values
<b>for the first call Operation 4 + 3.</b>
Operation MAcro..
&1 = 4
&2 = +
&3 = 3.
output Macro..
&4 is result....
<b>for the second call Operation 2 ** 3.</b>
&1 = 2
&2 = **
&3 = 3.
output Macro..
&4 is result..
2007 Apr 18 6:22 AM
Hi,
u hav declared 3 variables n1 n2 result. and there are 2 macros defined in the code operation and output.
operation 4 + 3.
the above statement inserts the values in the place holders and after calculating then it places the values in macros result.
regards,
kiran kumar k
2007 Apr 18 6:26 AM
hi,
you have created two Macros operation and output.
and then when you execute the below code their respective macros will get executed
operation 4 + 3.
operation 2 ** 7.
operation n2 - n1.
for example : operation 4 + 3. will execute operator macro in which it Contains the output macro and the result will be displayed.
regards,.
santosh.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |