Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror

Comment Re:Comments (Score 2, Insightful) 682

>Using the constant on the left hand side of an equality test such as
>this will cause a compile-time error if you accidentally type
>const int SCREEN_WIDTH = 456;
>if (SCREEN_WIDTH = xCoordinate) { ...

It depends on the language. Any language that has a boolean type is going to give a compile time error to xCoordinate = SCREEN_WIDTH. The only time it will not is if you write if (something = true). But then again that comes down to bad code.

Slashdot Top Deals

Nothing will ever be attempted if all possible objections must be first overcome. -- Dr. Johnson

Working...