justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

Question: Do-while loop at least do it for one time, then check for condition. I want the opposite of it. I want a loop for my code, and don't want to execute it for the first time, but then I want to execute them for second, third, fourth, and so on... iterations (until a condition is satisfied). How can I do that?
Asked by Abhi (117.99.173.x) on January 6 2023, 9:13am
Reply on January 6 2023, 7:11pm:
    Sounds like you want a normal while loop?


Comments:
  • Posted by Mespotine (46.114.203.x) on January 7 2023, 11:23am:
    loopcount=loopcount+1

  • Posted by Mespotine (46.114.203.x) on January 7 2023, 11:23am:
    if loopcount>1 then

  • Posted by Mespotine (46.114.203.x) on January 7 2023, 11:24am:
    // do the things in your loop

  • Posted by Mespotine (46.114.203.x) on January 7 2023, 11:28am:
    end if

  • Posted by Mespotine (46.114.203.x) on January 7 2023, 11:29am:
    check loop condition. Btw, it's better to ask in the forum as (pseudo)-code-snippets are hard to write here.


Comment:
    Your Name:   -- Site Owner's Name:  (for human-verification)

    Comment:    

    
  
[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2024 Justin Frankel. | RSS