Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


8.8.13 ^ operator (power) (find the power of two numbers)

Purpose

Raises one number to the power of another number, and returns an integer.

Syntax
Result = Number1 ^ Number2
Arguments
Result

Specify a variable for storing the result.

Number1

Write any numerical expression.

Number2

Write any numerical expression.

Description

The ^ operator raises the value of Number1 by the power of Number2, and returns an integer result.

Expressions with Empty values are handled as zero.

Note

When Result and Number1 are the same variable, you can use the ^= operator instead.

Example
' This code stores 8 in variable result1.
result1 = 2 ^ 3
JP1/Script version

Supported from JP1/Script 06-00.