In Ring 1.25 (GitHub) - Flexible Statement Separation

52 views
Skip to first unread message

Mahmoud Fayed

unread,
Dec 9, 2025, 3:06:43 AM (10 days ago) Dec 9
to The Ring Programming Language
Hello

In Ring 1.25 (GitHub), the language introduces support for using commas (,) as an alternative to semicolons (;) when separating statements.

Importantly, semicolons themselves are optional, so you can write code in three different styles

Example:

x=1, y=2, z=3 ? x, ? y, ? z x=10; y=20; z=30 ? x; ? y; ? z x=100 y=200 z=300 ? x ? y ? z

Output:

1 2 3 10 20 30 100 200 300

Example (2)

new xBaseUserInterface { @10, 10 say "Hello, World!" @11, 10 say "I Love Programming!" } class xBaseUserInterface func braceError ? getVarName(cCatchError) func getVarName cError if left(cError,11) = "Error (R24)" return substr(cError,45) ok func braceExprEval vValue if vValue ? vValue ok

Output:

@10 10 say Hello, World! @11 10 say I Love Programming!
Greetings,
Mahmoud

Ilir Liburn

unread,
Dec 9, 2025, 5:53:25 PM (9 days ago) Dec 9
to The Ring Programming Language
Hello Mahmoud,

It will be a nice refresher for the 10th anniversary of The Ring. This is consistent with the index access of contiguous memory for arrays. e.g.

? array[1,2,3]

Greetings,
Ilir

Mahmoud Fayed

unread,
Dec 9, 2025, 6:00:01 PM (9 days ago) Dec 9
to The Ring Programming Language
Hello Ilir

You are welcome :D

Greetings,
Mahmoud

Reply all
Reply to author
Forward
0 new messages