excute once inside a loop ?

 

hello

is there any easy way to execute a lets say a function or a Print  for example inside a loop (do while )?

i can make it execute if a flag is true and then set to false but any other solution ?

Thanks

 
Ahmed_Fouda:

hello

is there any easy way to execute a lets say a function or a Print  for example inside a loop (do while )?

i can make it execute if a flag is true and then set to false but any other solution ?

Thanks

Why do you need an other solution ? A true/false is just fine.
 
Alain Verleyen #:
Why do you need an other solution ? A true/false is just fine.
Trying to learn other ways if there is any !
 
Ahmed_Fouda #:
Trying to learn other ways if there is any !

While coding, you should learn by solving real problems, not by creating yourself the problem.

What is your actual problem to solve ?

 
Ahmed_Fouda #:
Trying to learn other ways if there is any !

Leave the loop by either break; or the function with the loop by return;