Forum
REPEAT UNTIL - Printable Version

+- Forum (https://www.boriel.com/forum)
+-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12)
+--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11)
+---- Forum: Wishlist (https://www.boriel.com/forum/forumdisplay.php?fid=14)
+---- Thread: REPEAT UNTIL (/showthread.php?tid=2252)



REPEAT UNTIL - zarsoft - 11-28-2022

Hi

I'd like to use the Pascal mode because it's simpler:


Code:
REPEAT
    [<sentences>]
UNTIL <condition>




I dont like to use:

Code:
DO
    [<sentences>]
LOOP UNTIL <condition>



RE: REPEAT UNTIL - boriel - 11-29-2022

It's the standard Syntax for most modern BASIC languages nowadays:

FreeBasic: https://www.freebasic.net/wiki/KeyPgLoop
Visual Basic .NET: https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/do-loop-statement


RE: REPEAT UNTIL - zarsoft - 11-30-2022

(11-29-2022, 03:28 PM)boriel Wrote: It's the standard Syntax for most modern BASIC languages nowadays:

FreeBasic: https://www.freebasic.net/wiki/KeyPgLoop
Visual Basic .NET: https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/do-loop-statement


Then, I will do it with #define :


Code:
#define REPEAT  DO
#define UNTIL   LOOP UNTIL

REPEAT
  Game
UNTIL GameOver



RE: REPEAT UNTIL - boriel - 11-30-2022

(11-30-2022, 10:37 AM)zarsoft Wrote:
(11-29-2022, 03:28 PM)boriel Wrote: It's the standard Syntax for most modern BASIC languages nowadays:

FreeBasic: https://www.freebasic.net/wiki/KeyPgLoop
Visual Basic .NET: https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/do-loop-statement


Then, I will do it with #define :


Code:
#define REPEAT  DO
#define UNTIL   LOOP UNTIL

REPEAT
  Game
UNTIL GameOver

Very smart!! Cool