End For Each

Verb: endFor

Terminates a command block started by the For Each command.




Loop started by the For Each command displays a message multiple times and End For Each terminates the command block.

defVar --name collection --type List --innertype Numeric --value "[1,2,3,4,5]"
defVar --name iterator --type Numeric
foreach --collection "${collection}" --variable "${iterator}" --distinct
	logMessage --message "Numeric repetition: ${iterator}" --type "Info"
logMessage --message "End foreach" --type "Info"
// Performs 5 repetitions and ends with "End foreach".


End For Each can only be used with For Each.

See Also

  • Begin Do-While
  • Case
  • Continue
  • Else
  • Else If
  • End Case
  • End Do-While
  • End If
  • End While
  • Execute Subroutines
  • For
  • For Each
  • Go to
  • Go to If
  • If
  • Insert Label
  • Interrupt Loop
  • Next
  • Otherwise
  • Return from Subroutine
  • Run Subroutine
  • Run Subroutine If
  • Then
  • When
  • While