Please enable JavaScript to view this site.

 

Navigation: Macros > Macro Language > Compiler Messages > Errors

Range variable must be numeric

Scroll Prev Up Next More

This compiler error will occur if a non-integer variable is used inside the range operator.

 

For example:

if nTemp in [sTempMin..nTempMax] 
    
endif

In the example above sTempMin refers to a string variable and this is the cause of this message. Note however, that the following is perfectly allowed.

if sTemp in [sTempMin, sTempMax, sTempMid] 
    
endif

The cause of this error is not the use of strings with the membership operator (this is allowed as seen above), but the use of strings in the range [..] operator.

 


Topic 109024, last updated on 18-Apr-2020