05-22-2010, 11:27 PM
boriel Wrote:So WHILE is not "redundant" to me, but DO WHILE.
You're right: WHILE...END WHILE is more common. I said it's redundant only because a versatile DO...LOOP makes it unnecessary. But I'm not suggesting to remove it
boriel Wrote:Also ZX BASIC support DO: ... : LOOP (which repeats forever).
Yes. By the way, I've just discovered that Beta Basic supports even this:
Code:
do while condition
...
loop until condition
It seems quite useful. Anyway I guess it's easier for the Beta Basic interpreter to let that a double condition than to forbid it. What do you think about letting both conditions in ZX Basic?
Beta Basic lacks END IF, so IFs cannot spread on several lines. But this trick can be used instead:
Code:
do while condition
...
loop until 1
boriel Wrote:Anyway, I will add support for FreeBasic DO...LOOP implementation to maintain compatibility, since this easies the portability between ZX BASIC and FreeBasic. :roll:
Great. The backward compatibility with Sinclair Basic and the forward compatibility with FreeBASIC make ZX Basic quite promising!
Marcos Cruz
http://programandala.net
http://programandala.net