Jump to content

  • Log In with Google      Sign In   
  • Create Account


- - - - -

Suggestion: Expression has no effect


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Friggle   Members   -  Reputation: 133

Like
0Likes
Like

Posted 22 October 2010 - 10:45 PM

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

Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3293

Like
0Likes
Like

Posted 23 October 2010 - 12:26 PM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS