ANY-maze Help > The ANY-maze reference > The Protocol page > The elements of a protocol > Testing > Procedures > Writing a procedure using the procedure editor > Errors and warnings while writing a procedure > Warning: The procedure uses the 'Test is running' or 'Test is paused' variable before the start of the test

Warning: The procedure uses the 'Test is running' or 'Test is paused' variable before the start of the test

Description

This warning is displayed in the list of errors and warnings at the bottom of the procedure editor when it tries to use the Test is running or Test is paused built-in variable before the test has started.

The procedure editor splits the procedure into two sections - the first, with a shaded background, is the section that runs before the test starts. Using the Test is running or Test is paused variable is irrelevant in this section of the procedure, because its value is always False. The flag can be used in the lower, un-shaded section of the procedure to check whether the test is still running or paused, i.e. the test has not yet ended.

Note that when a test stops, the procedure will also stop running, although if it is in the middle of a sequence of statements at the point that the test stops, it will continue to run until it reaches the end of these statements. If ANY-maze detects that the procedure is stuck in a loop at this point, the procedure will be forcefully exited.

Example

The following procedure will generate an error for the first use of the Test is running variable, because it's before the test starts. The second use, after the test starts, is OK.

  

  

Figure 1. This procedure will generate an error for the first use of the Test is running variable, but not the second.

See also:

 Errors and warnings while writing a procedure 
 Errors and warnings while running a procedure 
 Built-in variables 

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T0530