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!