Advertisement

Suggestion: Expression has no effect

Started by October 23, 2010 04:45 AM
0 comments, last by WitchLord 14 years, 1 month ago
I just realized that the AngelScript compiler does not seem to warn if an expression has no effect.
Example:

int myVar = 5;myVar;  // Could raise a warning


This is not so much an issue for variable related statements but in case someone wants to call a function and fails to append the paranthesis after the function name the function is not called and no warning is generated.

Example:

void SomeFunction(){    ...}SomeFunction;  // Would be nice to have a warning raised here.


Just a thought...

Cheers,
Thomas
Good point. I'll see if I can have this alert added to the compiler.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement