Mmm, stringy



  • string found = "false";
    while (found == "false") {
      ...
        about
          50
            lines
              of
                heavily
                  nested
                    code
      ...
      found = "true";
    }


  • [quote user="bobday"]

    string found = "false";
    while (found == "false") {
    ...
    about
    50
    lines
    of
    heavily
    nested
    code
    ...
    found = "true";
    }

    [/quote]

    You obviously didn't read all those 50 lines properly. Somewhere in there was

    found = "FileNotFound"
     



  • Sorry, I don't really see what's wrong with it - I'd bet inside the loop there's some "continue" which is meant to redo the stuff again.

    However, when I did it, it would be a while(1) { ... if(cond) continue; ... if(cond) continue; ... ... ... break; }



  • the clue is in the title - he should have used a boolean:


    bool found = false; while (!found) {..... found = true; }

     

    (note - I am not the OP - am just using the same account) 



  • [quote user="m0ffx"][quote user="bobday"]

    string found = "false";
    while (found == "false") {
    ...
    about
    50
    lines
    of
    heavily
    nested
    code
    ...
    found = "true";
    }

    [/quote] You obviously didn't read all those 50 lines properly. Somewhere in there was

    found = "FileNotFound"
     

    [/quote]

    Maybe you'll even find...

    found = "null";
    found = "very null";
    found = "brillant";
    


  • The Real WTF is this thread.



  • enough with the real wtf shit...

    besides,
    the REAL question is where is the spec?


Log in to reply