XPL0 Warnings

Top  Previous  Next

Compile errors occur when a program is being compiled and they indicate ambiguous syntax that may or may not be an error.  If the compiler detects an warning condition, it displays it in the Message Panel and continues compiling. Sometimes the warning messages can be overwhelming so you have the option enabling or disabling individual warning messages in the Configuration Dialog.

 

 

1. Local Name Same As More-Global Name. This warning occurs when a local variable is the same name as another, more global variable. In that situation, the Compiler will always use the more local variable. In this situation, there is a risk the programmer may have meant to access the more global variable and the warning gives you a chance to check.

 

2. Rounding Errors Make Equality Unlikely. Because of rounding errors, it is very unlike that two variables will have the same value. The Compiler gives this message whenever you compare two values using an the "=" symbol. You are usually better off using ">", ">=", "<" or "<=".

 

3. Control Character. This warning occurs when the Compiler finds a control character or extended character in a string or as a character constant. Many control and extended characters are non-printing characters that don't display on the screen. That means the programmer can't see them and they may have been entered accidentally. The warning allows check the code and verify that you did intend to enter a control or extended character.

 

4. Use "other" Instead Of "else". The default option of a case statement can be specified using either "else" or "other." The "other" statement is preferable because it easier to distinguish from the "else" statement from a nearby "if-then-else" statements.

 

5. Commas Missing In "define". Although the "define" command expects each argument to separated by commas, the Compiler can compile them without a commas as long as they are separated by white-space characters. This warning encourages you to use the preferred syntax.

 

6. Unknown Warning. This warning is currently unused. If you receive this error, it indicates that the program has serious errors and the Compiler has gotten itself into bad state.

 

7. Doubled Unary Operator: ++, --, Or ~~. This warning indicates that a unary operator is used two or more times in sequence. Although the Compiler can make sense out of this type of doubled operators, they are probably errors and should be removed.

 

8. Defined But Not Used. This warning indicates that a variable has been defined but was never used. The warning is useful for cleaning up unnecessary clutter.

 

9. "addr" of "for" Loop Control Variable. This warning indicates that the program is taking the address of a for-loop control variable. There are very few reasons why a programmer might need the address of a for-loop variable and the warning is meant to alert the programmer that it is probably an error.

 

10. Value assigned but never used. This warning indicates that value has been assigned to a variable and that value is unused, either because it is overwritten before it can be used or the variable itself is never used. The warning is useful for cleaning up unnecessary clutter.

 

11. "eproc" & "ext" not supported in this version. External subroutines are not available in EXPL.

 

12. Possible Type Mismatch. This warning indicates that there maybe a type mismatch between an intrinsic prototype and the arguments used to call the intrinsic. These occur when there is an argument that is technically legal, but but is likely invalid.

 

These warnings occur when you pass an non-pointer variable to an intrinsic that is expecting a pointer. This would usually occur when you use an argument without an "@" or "addr" before it. For example, assuming that "Test" is expecting

 

code Test(void:@int)=1;

 

int I;

 

Test(I);                \ Gets a warning

Test(@I);                \ No warning

 

The first statement only gets a warning because "I" could contain a pointer if the programmer executed this statement first:

 

I:=@;