ProtoFlux:Async Range Loop Int: Difference between revisions

From Resonite Wiki
m 989onan moved page ProtoFlux:Async Range Loop Int to ProtoFlux:ASync Range Loop Int: Misspelled title
Add info, needs clarification
Line 18: Line 18:
|}}
|}}


{{Stub}}
{{Stub}}<i> Missing clarification </i>
 
Range Loop Int is a ProtoFlux node that allows for firing a bunch of executions like a [[ProtoFlux:ASync For|ASync For Loop]] except that instead of having to go one at a time from 0->count, you can specify a Start ([[Type:Int|int]]) number, End ([[Type:Int|int]]) number, and a StepSize ([[Type:Int|int]]) which all determine the range of numbers that will come out of Current ([[Type:Int|int]]) during execution and the distance between each Current ([[Type:Int|int]]) outputted.
 
This node will do a bunch of async tasks in order in an Async context, waiting for each task to be done before moving to the next one. This is useful if you want to do a bunch of [[ProtoFlux:GET String|GET String]] requests but you need to wait for the previous one to be done before doing the next, for a specified number of times. This does not behave the same as using a [[ProtoFlux:Start ASync Task|Start ASync Task]] on every [[ProtoFlux:Range Loop Int|Range Loop Int]] iteration or even before the [[ProtoFlux:Range Loop Int|Range Loop Int]] using a [[ProtoFlux:Start ASync Task|Start ASync Task]].
 
== Inputs ==
 
=== * ([[Type:Int|int]]) ===
 
Start Execution of the ASync Range Loop.
 
=== Start ([[Type:Int|int]]) ===
 
The number to start at when executing.
 
=== End ([[Type:Int|int]]) ===
 
The number to end at when executing.
 
TODO: Is this inclusive or exclusive?
 
=== StepSize ([[Type:Int|int]]) ===
 
How much to add to Start ([[Type:Int|int]]) per execution for the Current ([[Type:Int|int]]) output number.
 
== Outputs ==
 
=== LoopStart ([[Impulses#ASync|SyncResumption]]) ===
 
Fires when the loop starts, regardless of executions of the ASync Range Loop.
 
=== LoopIteration ([[Impulses#ASync|SyncResumption]]) ===
 
Fires every time Current ([[Type:Int|int]]) increases by StepSize ([[Type:Int|int]]) and (has just or hasn't/hasn't)? hit the End ([[Type:Int|int]]) limit. Waits till the previous LoopIteration ([[Impulses#ASync|SyncResumption]]) is done or after LoopStart ([[Impulses#ASync|SyncResumption]]) is done before firing this one.
 
TODO: Is this inclusive or exclusive?
 
=== LoopEnd ([[Impulses|Continuation]]) ===
 
Fires once the loop has finished.
 
=== Current ([[Type:Int|int]]) ===
 
The current number between Start ([[Type:Int|int]]) and End ([[Type:Int|int]]). has a value during every LoopIteration ([[Impulses#ASync|SyncResumption]]).
 
== Examples ==
 
<gallery widths=480px heights=480px>
File:Protoflux_example_ASync_Range_Loop_Int.webp|ASync Range Loop Int being used to iterate over every other character in a string using [[ProtoFlux:Get Character|Get Character]] and then calling a read cloud variable using the character.
</gallery>


[[Category:ProtoFlux:Flow:Async]]
[[Category:ProtoFlux:Flow:Async]]

Revision as of 20:07, 16 February 2024

Async Range Loop
*
LoopStart
Start
LoopIteration
End
LoopEnd
StepSize
Current
Async


This article or section is a Stub. You can help the Resonite Wiki by expanding it.

Missing clarification

Range Loop Int is a ProtoFlux node that allows for firing a bunch of executions like a ASync For Loop except that instead of having to go one at a time from 0->count, you can specify a Start (int) number, End (int) number, and a StepSize (int) which all determine the range of numbers that will come out of Current (int) during execution and the distance between each Current (int) outputted.

This node will do a bunch of async tasks in order in an Async context, waiting for each task to be done before moving to the next one. This is useful if you want to do a bunch of GET String requests but you need to wait for the previous one to be done before doing the next, for a specified number of times. This does not behave the same as using a Start ASync Task on every Range Loop Int iteration or even before the Range Loop Int using a Start ASync Task.

Inputs

* (int)

Start Execution of the ASync Range Loop.

Start (int)

The number to start at when executing.

End (int)

The number to end at when executing.

TODO: Is this inclusive or exclusive?

StepSize (int)

How much to add to Start (int) per execution for the Current (int) output number.

Outputs

LoopStart (SyncResumption)

Fires when the loop starts, regardless of executions of the ASync Range Loop.

LoopIteration (SyncResumption)

Fires every time Current (int) increases by StepSize (int) and (has just or hasn't/hasn't)? hit the End (int) limit. Waits till the previous LoopIteration (SyncResumption) is done or after LoopStart (SyncResumption) is done before firing this one.

TODO: Is this inclusive or exclusive?

LoopEnd (Continuation)

Fires once the loop has finished.

Current (int)

The current number between Start (int) and End (int). has a value during every LoopIteration (SyncResumption).

Examples