===== For / Next ===== ==== Format ==== **for** [[variables|variable]] = //expression1// **to** //expression2// [ **step** //expression3// ] \\ [[programsyntax|statement(s)]]\\ **next** [[variables|variable]] ==== Description ==== The FOR and NEXT commands are used in conjunction to execute a command or group of commands a specified number of times. When the FOR command is first encountered, the [[variables|variable]] is set to //expresssion1//.\\ After each NEXT command, [[variables|variable]] is incremented by 1 (the default), or by //expression3// if the optional STEP is used, until [[variables|variable]] is greater than or equal to //expression2// for positive step values, or less than or equal to //expression2// for negative step values. ==== See Also ==== {{page>en:start#Program Control&noheader}}