316

"Professor, my if loop isn't working!"
IF LOOP!?!?!?!! 😫🔫

Comments
  • 17
    Classic. There is even a site in Germany for this topic.

    http://www.if-schleife.de

    https://translate.google.com/transl...=
  • 3
    I don't know y!
    I always tend to say if-else loop

    I thought its only me, who is telling if loop
  • 14
    Label aaaaa

    If not something
    Goto aaaaa

    kill(me)
  • 3
    {% for something in somethingElse if bob %}

    ...would that work? :D

    Twig templates.
  • 0
    Maybe, just maybe, (s)he meant while loops. Because of the similarity in syntax
  • 4
    @Makenshi Aaalter if-schleife wasssss?! Oh man ich muss raus :))
  • 1
    @Nawap they aren't loops, they are conditional statements. for and while are loops because they repeat; if-else statements do not.
  • 1
    Which language? Maybe he/she is writing in basic and does a "goto" after an if, directly before the if again, until the if is false.

    Soooo....you can basic-ally say there are if-loops :D

    Internally loops do this all the time.
  • -1
    Def event()
    If(condition)
    Doahit()
    Else:
    Event()
  • 3
    Correct him.If he does it again, highfive him in the face with a steel chair ;)
  • 1
    @gears how to get an overflow 101
  • 0
    Well why not just use while loops for everything. It will make your code way more robust as one mistake will cause infinite loop. 🤣
  • 2
    while ( condition ) {
    // this is an if loop.
    }
  • 2
    Well techincally you could make a loop with if's..

    Just throw a goto into it..
  • 1
    // I call it if loop

    if (true) for (;true;) { }
  • 1
    bunch of noobs, use goto loops :D
  • 1
    mark:
    if ( check_condition() ) {
    goto mark;
    }

    It's an if loop 😂
  • 1
    @Phlisg Twig/Volt for the win
  • 1
    @localjoost except when a CMS makes it the "language of choice" to front-end devs like me, they closed-source their CMS and only leave access to views. I have to do logic in Twig :(
  • 1
    If can be a loop if use it recursively.😒
Add Comment