From wiki.ginstr.com
Jump to: navigation, search
m (formatting)
 
Line 10: Line 10:
 
===Repeat the execution of commands based on value===
 
===Repeat the execution of commands based on value===
  
;<code>[gn:act_while]|[parameterSource,comparedSource;ACTIONS]</code>
+
:;<code>[gn:act_while]|[parameterSource,comparedSource;ACTIONS]</code>
  
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
+
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
|-
 
! scope="col" | Parameter
 
! scope="col" | Parameter
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| [[source|parameterSource]]
+
| <code>[[source|parameterSource]]</code>
 
| [[source]] from where the while action is using value as expression parameter
 
| [[source]] from where the while action is using value as expression parameter
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:
 
** any [[source]]
 
** any [[source]]
 
|-
 
|-
| [[source|comparedSource]]
+
| <code>[[source|comparedSource]]</code>
 
| [[source]] from where the while action is using value as expression comparsion parameter
 
| [[source]] from where the while action is using value as expression comparsion parameter
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:
 
** any [[source]]
 
** any [[source]]
 
|-
 
|-
| [[Action_Library|ACTIONS]]
+
| <code>[[Action_Library|ACTIONS]]</code>
 
| list of actions which will be executed continuously until "while" expression returns false
 
| list of actions which will be executed continuously until "while" expression returns false
 
|-
 
|-
Line 33: Line 33:
  
 
====Example====
 
====Example====
<code>@variable/whileTrueParameter</code> - 1st expression parameter<br>
+
:<code>@variable/whileTrueParameter</code> - 1st expression parameter<br>
<code>@variable/true</code> - 2nd expression parameter<br><br>
+
:<code>@variable/true</code> - 2nd expression parameter<br>
<code>[gn:act_while]|[@variable/whileTrueParameter,@variable/true;[gn:act_calculate]|[@variable/counter,@variable/counter+1]]</code>
+
:; ⤷ <code>[gn:act_while]|[@variable/whileTrueParameter, @variable/true;[gn:act_calculate]|[@variable/counter, @variable/counter+1]]</code>
 
<hr>
 
<hr>

Latest revision as of 16:36, 12 July 2017

gn:act_while

Description
Action used to repeat the execution of actions, while parameter value is the same as compared value.
Action returns
void

Action signatures

Repeat the execution of commands based on value

[gn:act_while]|[parameterSource,comparedSource;ACTIONS]
Parameter Description
parameterSource source from where the while action is using value as expression parameter
comparedSource source from where the while action is using value as expression comparsion parameter
ACTIONS list of actions which will be executed continuously until "while" expression returns false

Example

@variable/whileTrueParameter - 1st expression parameter
@variable/true - 2nd expression parameter
[gn:act_while]|[@variable/whileTrueParameter, @variable/true;[gn:act_calculate]|[@variable/counter, @variable/counter+1]]