Power
ActionStep Reference » Programming » Number Operation » Basic » Power
The ActionStep Power raises the value of the base to the specified power exponent and stores the raised number in Result of the Result List. Only the Floating Point data type is allowed.
- Open the Programming node in the Workspace Explorer.
- Open the Number Operation node.
- In the Basic node, select the Power ActionStep.
Parameters:
The ActionStep has the following input parameters:
name |
Description
|
---|---|
Number Type
|
Specifies the data type to be used for the numbers raised to a certain value.
Allowed Context Scope [Fixed] Allowed Value [Floating Point, Signed Number, Unsigned Number] |
Base |
The number to be raised on a specified power.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Exponent |
The number that specifies the power.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Results:
The ActionStep returns the following results:
name
|
description
|
---|---|
Result |
Contains the number raised on a specified power.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter] |
The number type set in the ActionStep Power determines the data type of its Result even if the variables and/or parameters that were set for base and exponent are of different data types. |
Example 1 (Raised the Power of a Variable):
This example raises the contents of a local variable, Tile Side, that has the data type Floating Point. The raised value of the local variable is then output via the Message Box.
Example 2 (Convert Scientific Notation to Standard Notation):
This example uses the Power ActionStep to convert the contents of a local variable, Measure, that has the Floating Point data type, to a standard notation. The specified number was multiplied to 10 raised to the 3rd power and then output via a Write Text.
See other Basic operations:
Add
Subtract
Multiplicate
Divide
Modulo
Root
Increment
Decrement
Random