Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DO WHILE and DO UNTIL
#2
programandala.net Wrote:Here you are my first two cents for the wishing well:

Now the DO-LOOP syntax is:

Quote:Do
[ statement block ]
Loop [ { Until | While } condition ]

I miss the following variant, allowed in FreeBASIC, Beta Basic and others:

Quote:Do [ { Until | While } condition ]
[ statement block ]
Loop

I think it's nice and clear to use just one loop structure and simply move the conditions. In fact the (less elegant, in my opinion) WHILE-WHILE END structure would be redundant (though it exists in FreeBASIC too).
I didn't know DO UNTIL... LOOP was allowed in VB, since UNTIL usually is supposed to be at the end. Those constructions are not supported.
DO WHILE...LOOP can be implemented as WHILE ... END WHILE or WHILE ... WEND.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)