step means "step size" in computer programming. It generally appears in computer algorithm syntax statements. The syntax is such as "For counter = start To end [Step step]", where the parameter "counter" is used Be the numerical variable of the loop counter, and Step represents the step size.
In the computer, in the algorithm circulation statement, Step
For...Next statement——specified number of times to repeatedly execute a set of statements.
Syntax
For counter = start To end [Step step] [statements] [Exit For] [statements] Next [counter]
Description:
counter required parameters. Numeric variable used as loop counter. This variable cannot be a Boolean or array element. start required parameter. The initial value of counter.
End required parameter, the final value of counter.
Step Optional parameter. The step size of counter. If not specified, step defaults to 1.
Statements optional parameters. One or more statements placed between For and Next that will be executed a specified number of times.
Description:
The step parameter can be a positive or negative number. The step parameter value determines the execution of the loop:
If the step parameter is a positive number or 0, then: counter <= end; if it is a negative number, then counter >= end
The above is the detailed content of What does step mean in computer programming?. For more information, please follow other related articles on the PHP Chinese website!