View Single Post
  #10  
Old 11-24-2008, 09:15 PM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
I'm surprised that this doesn't produce an error. I've never seen functions declared like so:

PHP Code:
function onKeyPressed(keycharcharacter)

  if (
character == "9"){
   
show();

When I first looked at this, it looked like you defined show() inside of onKeyPressed(). I suggest using braces where you can. This would make it a lot clearer:

PHP Code:
function onKeyPressed(keycharcharacter)
// Added a brace here ...
     
if (character == "9")
     {
          
show();
     }
// .. and here 
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote