You can do it in RPGLE very easily using the Eval statement.
You use "**" as the mathematical operator which means "raise to the power of". So, the following line will work:
Eval Result = X **n
All the best
Jonathan
Last Wiki Answer Submitted: April 20, 2005 4:18 am by astradyne370 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.