|
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: Both sides of the operator are constant expressions Warning: Both sides of the operator are constant expressions
DescriptionThis error is displayed in the list of errors and warnings at the bottom of the procedure editor when using any comparison operator (for example >, <, = or not =) and both sides of the expression are constant expressions - i.e. they won't change at any point when the procedure runs. More informationComparison operators will compare the value of the left-hand side with the right-hand side, and return True or False as a result of the comparison. However, if the parameters on either side of the comparison are both constant expressions (i.e. they will never change) then the result of the comparison will never change either - it will always return True or will always return False. This probably means that you've made a mistake when writing the procedure. The most likely cause of this warning is because you've used a piece of text instead of using a variable; for example:
Figure 1. It's easy to make the mistake of typing the name of a variable, rather than using the variable itself. This will be flagged as a warning.
Figure 2. The procedure in figure 1 has been corrected by using the variable itself.
If you make the mistake shown in figure 1 above, and you've defined a variable with the same name, the list of errors and warnings at the bottom of the procedure editor will contain an additional note asking if you meant to use the variable itself, rather than the text of the variable's name. See also:
© Copyright 2003-2026 Stoelting Co. All rights reserved ANY-maze help topic T0505 |