GSAK (Geocaching Swiss Army Knife)
Contents - Index

Repeat (command)

Repeat

Use this command to repeat a sequence of statements until a certain condition exists. Basically it is very similar to the While command, the main difference is that your loop is *always* executed at least once. While still has its uses but many programmers find the repeat/until construct more intuitive - and easier to follow in many circumstances.

Repeat statements can be nested, but every Repeat statement must have a matching Until statement. Use BreakRepeat to break out of the Repeat loop

Use Until <expression> to complete the loop.  The expression used must return a Boolean true or false value. 

Example:
 

$data = GetFile("c:\temp\test.csv")
$rows = Val(CsvGet($data,"rows"))
$x = 0
Repeat
  $x = $x + 1
  $col3 = CsvGet("*","$x,3")
  // do what ever you want with $col3
Until $x = $rows

 

Alpha List         Category List


Copyright 2004-2019 CWE Computer Services  
Privacy Policy Contact