similar server error

Results 1 to 2 of 2

Thread: similar server error

  1. #1
    Join Date
    Dec 1969

    Default similar server error

    I noticed surfrjohn&#039;s post and wanted to ask, shouldn&#039;t this code throw a server error?<BR><BR>if (manual == "yes"){<BR> code<BR>}<BR>else if (manual == "yes"){<BR> code<BR>}<BR><BR>My server allows this but I don&#039;t think it should. Any ideas??

  2. #2
    Join Date
    Dec 1969

    Default RE: similar server error

    Why would it throw an error?<BR><BR>The compiler in this case is going line by line, it&#039;s not evaluating the whole logic at once like a human does.<BR><BR>It goes to the first line, if it&#039;s true, it executes it, else it goes to the else line.<BR>If it gets to the else line, and that else line evaluates to true, then it executes that code. It never will realize that you&#039;re checking for the same condition in both, computers just don&#039;t work that way (not yet, at least). They do exactly as they are told.<BR><BR>Hope that clears things up for you a bit.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts