pascalboy:
If you use while in place of if or vice versa.
Does it make difference?
while and if are not equal or equivalent . . . for and while do the same job.
If you use while in place of if or vice versa.
Does it make difference?
if(condition) // if the condition is true { do something // it does something once } while(condition) // while the condition is true { do something; // it does something repeatedly in a loop until condition is false break; // or break out of the loop }
In the example above I make the while behave the same as the if because it will do something once then break out of the while loop. If you dont use break you must create another logical end to the loop, otherwise it will loop forever.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Does it make difference?