Advertisement

if put a at the end or not

Started by June 16, 2009 07:51 PM
9 comments, last by Cornstalks 15 years, 5 months ago
In the first bit of code, you have an if statement (if (cout == 200)), followed by a statement to be executed if the statement is true (iObjectHide(OJB_0)), followed by the terminating semicolon ';'.

In the second bit of code, you have an if statement (if (IN_22 > 0)), followed by the terminating semicolen ';'. The semicolon is reached before the block of code that should be executed if the if statement is true, which means the if statement has absolutely no effect on whether or not that block of code will run. The block of code will always run because it is "outside" of the if statement.

[edit]

Epic ninja'd...
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

This topic is closed to new replies.

Advertisement