January 12th, 2013, 04:06 AM
what does this do..?
January 12th, 2013, 12:55 PM
Q1: endless loop.
Originally Posted by Viky
Q2: How about you try describing what you think it does and we'll correct you. That's ultimately a better way to learn.
Comments on this post
January 13th, 2013, 04:30 AM
My apologies Walt; somewhat unfair - you only answered the first question. :o I did not however down-rep you in my response if that is any consolation.
Last edited by clifford; January 13th, 2013 at 04:40 AM.
January 13th, 2013, 04:37 AM
A for statement comprises four parts:
- 1 Initial expression,
- 2 loop condition expression,
- 3 loop body
- 4 iteration expression
And operates thus:
do 1 then while 2 do 3 then 4
Any of 1,2,3 or 4 may be empty (or null) statements. A null statement is just a semi-colon on its own.
An expression is implicitly "true" is it is non-zero.
That is all you need to know to work out the answer to both.