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
Last Wiki Answer Submitted: April 20, 2005 4:18 am by astradyne370 pts.