The Ring is an Innovative and practical general-purpose multi-paradigm scripting language that can be embedded in C/C++ projects, extended using C/C++ code and/or used as standalone language. The supported programming paradigms are Imperative, Procedural, Object-Oriented, Functional, Meta programming, Declarative programming using nested structures, and Natural programming. The language is portable (Windows, Linux, Mac OS X, Android, etc.) and can be used to create Console, GUI, Web, Games and Mobile applications. The language is designed to be Simple, Small, Flexible and Fast. Its Dynamic Language (Dynamic Typing and Weakly Typed) that compile the source code to byte code then execute it by the Ring Virtual Machine, which is integrated with the Ring Compiler in one program. The first version of the language (around 100,000 lines of C/C++/Ring code) is released on January 25th, 2016
Basic
Getting Started
Variables
Operators
Control Structures
Getting Input
Functions
Lists
Strings
- Strings
- String Literals
- Get String Length
- Convert Letters Case
- Access String Letters
- Left() Function
- Right() Function
- Trim() Function
- Copy() Function
- Lines() Function
- Substr() Function
- Find substring
- Get substring from position to end
- Get Number of Characters From Position
- Transform Substring To Another Substring
- strcmp() Function
- str2list() and list2str() Functions
Date and Time
Check Data Type and Conversion
- Check Data Type and Conversion
- Check Data Type
- IsString() Function
- IsNumber() Function
- IsList() Function
- Type() Function
- IsNULL() Function
- Check Character
- IsAlNum() Function
- IsAlpha() Function
- IsCntrl() Function
- IsDigit() Function
- IsGraph() Function
- IsLower() Function
- IsPrint() Function
- IsPunct() Function
- IsSpace() Function
- IsUpper() Function
- IsXdigit() Function
- Conversion
- Number() Function
- String() Function
- Ascii() Function
- Char() Function
- Hex() Function
- Dec() Function
- Str2hex() Function
- Hex2str() Function
Mathematical Functions
Intermediate
Files
- Files
- Read() Function
- Write() Function
- Dir() Function
- Rename() Function
- Remove() Function
- Fopen() Function
- Fclose() Function
- Fflush() Function
- Freopen() Function
- Tempfile() Function
- Tempname() Function
- Fseek() Function
- Ftell() Function
- Rewind() Function
- Fgetpos() Function
- Fsetpos() Function
- Clearerr() Function
- Feof() Function
- Ferror() Function
- Perror() Function
- Fgetc() Function
- Fgets() Function
- Fputc() Function
- Fputs() Function
- Ungetc() Function
- Fread() Function
- Fwrite() Function
- Fexists() Function
- Example
System Functions
Eval() and Debugging
Demo Programs
ODBC Functions
- ODBC Functions
- odbc_init() Function
- odbc_drivers() Function
- odbc_datasources() Function
- odbc_close() Function
- Print List of ODBC Drivers
- Print List of ODBC Data Sources
- odbc_connect() Function
- odbc_disconnect() Function
- Open and Close Connection
- odbc_execute() Function
- odbc_colcount() Function
- odbc_fetch() Function
- odbc_getdata() Function
- Execute Query and Print Result
- odbc_tables() Function
- odbc_columns() Function
- odbc_autocommit() Function
- odbc_commit() Function
- odbc_rollback() Function
- Transactions and Using Commit and Rollback
- Save and Restore images
MySQL Functions
- MySQL Functions
- MySQL_Info() Function
- MySQL_Init() Function
- MySQL_Error() Function
- MySQL_Connect() Function
- MySQL_Close() Function
- MySQL_Query() Function
- Create Database
- Create Table and Insert Data
- MySQL_Insert_ID() Function
- MySQL_Result() Function
- MySQL_Next_Result() Function
- Print Query Result
- MySQL_Columns() Function
- MySQL_Result2() Function
- MySQL_Escape_String() Function
- Save Image inside the database
- Restore Image From The Database
- MySQL_AutoCommit() Function
- MySQL_Commit() Function
- MySQL_Rollback() Function
- Transaction Example
Security and Internet Functions
Advanced
Object Oriented Programming (OOP)
Declarative Programming using Nested Structures
Natural Language Programming
Functional Programming
Reflection and Meta-programming
- Reflection and Meta-programming
- locals() Function
- globals() Function
- functions() Function
- cfunctions() Function
- islocal() Function
- isglobal() Function
- isfunction() Function
- iscfunction() Function
- packages() Function
- ispackage() Function
- classes() Function
- isclass() Function
- packageclasses() Function
- ispackageclass() Function
- classname() Function
- objectid() Function
- attributes() Function
- isattribute() Function
- isprivateattribute() Function
- ismethod() Function
- isprivatemethod() Function
- addattribute() Function
- addmethod() Function
- getattribute() function
- setattribute() function
- mergemethods() Function
Extension using the C/C++ languages
- Extension using the C/C++ languages
- ring_ext.h
- ring_ext.c
- Module Organization
- Function Structure
- Check Parameters Count
- Display Error Message
- Check Parameters Type
- Get Parameters Values
- Return Value
- Function Prototype
- Sin() Function Implementation
- Fopen() and Fclose() Functions Implementation
- Ring API - List Functions
- Ring API - String Functions
- MySQL_Columns() Function Implementation
- Dynamic/Shared Libraries (DLL/So) and LoadLib() function
Embedding Ring Interpreter in C/C++ Programs
Command Line Options
Web Development (CGI Library)
- Web Development (CGI Library)
- Ring CGI Hello World Program
- Hello World Program using the Web Library
- Web Library Features
- HTTP Get Example
- HTTP POST Example
- Upload Files
- Cookies
- URL Encode
- Templates
- HTML Special Characters
- Hash Functions
- Random Image
- HTML Lists
- HTML Tables
- Gradient
- Generating Pages using Objects
- Using Bootstrap Library using Functions
- Using Bootstrap Library using Objects
- CRUD Example using MVC
- Users registration and Login
- Database, ModelBase & ControllerBase classes
- WebLib API
- Application Class
- Page Class
- ScriptFunctions Class
- StyleFunctions Class
Code Generator for wrapping C/C++ Libraries
- Code Generator for wrapping C/C++ Libraries
- Using the tool
- Configuration file
- Using the function prototype
- Adding code to the generated code
- Prefix for Functions Names
- Generate function to wrap structures
- Register New Functions
- Writing comments in the configuration file
- Executing code during code generation
- Configuration file for the Allegro Library
- Threads Support
- Code Generator Rules for Wrapping C++ Classes
- Using configuration file that wrap C++ Library
- Configuration file for the Qt Framework
Graphics and 2D Games programming using RingAllegro
Desktop and Mobile development using RingQt
- Desktop and Mobile development using RingQt
- The First GUI Application
- Using Layout
- Using the QTextEdit Class
- Using the QListWidget Class
- Using QTreeView and QFileSystemModel
- Using QTreeWidget and QTreeWidgetItem
- Using QComboBox Class
- Creating Menubar
- Creating Toolbar
- Creating StatusBar
- Using QDockWidget
- Using QTabWidget
- Using QTableView
- Using QProgressBar
- Using QSpinBox
- Using QSlider
- Using QDateEdit
- Using QDial
- Using QWebView
- Using QCheckBox
- Using QRadioButton and QButtonGroup
- Adding Hyperlink to QLabel
- QVideoWidget and QMediaPlayer
- Using QFrame
- Display Image using QLabel
- Menubar and StyleSheet Example
- QLineEdit Events and QMessageBox
- Other Widgets Events
- Using the QTimer Class
- Using the QFileDialog Class
- Drawing using QPainter
- Printing using QPrinter
- Creating More than one Window
- Playing Sound
- Using qLCDNumber Class
- Movable Label Example
- QMessagebox Example
- Using QInputDialog Class
- KeyPress and Mouse Move Events
- Moving Objects using the Mouse
- Inheritance from GUI Classes
- Using QDesktopWidget Class
- Simple Client and Server Example
- Notepad Application
- The Cards Game