Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?



The PWR function raises a number to the n'th power. It takes the general form:

PWR(expression1, expression2)


expression1 ^ expression2

Where both expression1 and expression2 should evaluate to numeric arguments. The function will return the value of expression1 raised to the value of expression2.


If expression1 is negative and expression2 is not an integer then a maths library error is displayed and the function returns the value 0. The error message displayed is:

pow: DOMAIN error

All calculations are performed at the maximum precision supported on the host machine and truncated to the compiled precision on completion.

Examples of use may be as:

A = 2
B = 31
CRT "2 GB is ":A^B


A = 2
B = 31
CRT "2 GB is": PWR(A, B)

Go back to jBASE BASIC.

Was this article helpful?