ANY-maze Help > The ANY-maze reference > The Protocol page > The elements of a protocol > Testing > Procedures > Running procedures > Errors and warnings while running a procedure > Warning: The repeat count is invalid.

Warning: The repeat count is invalid.

Description

When a Repeat statement is used to repeat a set number of times, the parameter specified for the statement must be an _integer_ value that is zero or greater.

You can use any numeric expression as the repeat count, but it must evaluate to a positive whole number.

If the result of an expression is used as the count, it's not possible for the procedure editor to work out what value that expression will have when you write the procedure, so ANY-maze can only check the value when the procedure is actually run. In this case, if the expression results in an invalid count (for example, the value is less than zero, or the value is undefined), then a warning will be displayed in the Test details report and the count used will be zero (i.e. the contents of the Repeat statement will not be run).

See also:

 Errors and warnings while writing a procedure 
 Errors and warnings while running a procedure 
 Loop statements 

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T0548