Ring is an open source programming language created in 2016 by Mahmoud Fayed.
#369on PLDB | 8Years Old | 195Repos |
Ring is a dynamic and general-purpose programming language. It can be embedded in C/C++ projects, extended using C/C++ code and/or used as a standalone language. The supported programming paradigms are imperative, procedural, object-oriented, functional, Meta programming, declarative programming using nested structures, and natural programming. Read more on Wikipedia...
see "Hello World"
New App
{
I want window
The window title = "hello world"
}
Class App
func geti
if nIwantwindow = 0
nIwantwindow++
ok
func getwant
if nIwantwindow = 1
nIwantwindow++
ok
func getwindow
if nIwantwindow = 2
nIwantwindow= 0
see "Instruction : I want window" + nl
ok
if nWindowTitle = 0
nWindowTitle++
ok
func settitle cValue
if nWindowTitle = 1
nWindowTitle=0
see "Instruction : Window Title = " + cValue + nl
ok
private
# Attributes for the instruction I want window
i want window
nIwantwindow = 0
# Attributes for the instruction Window title
# Here we don't define the window attribute again
title
nWindowTitle = 0
# Keywords to ignore, just give them any value
the=0
Feature | Supported | Example | Token |
---|---|---|---|
Strings | ✓ | "Hello world" | " |
Line Comments | ✓ | # A comment | # |
Comments | ✓ | ||
Semantic Indentation | X |