SlideShare a Scribd company logo
Ring Documentation, Release 1.8
Build RingInternet
cd ../extensions/ringinternet
./buildgcc.sh
Build RingMurmurHash
cd ../extensions/ringmurmurhash
./buildgcc.sh
Generate RingConsoleColors Source Code and Build
cd ../extensions/ringconsolecolors
./gencode.sh
./buildgcc.sh
Generate RingAllegro Source Code and Build
cd ../extensions/ringallegro
./gencode.sh
./buildgcc.sh
Generate RingLibCurl Source Code and Build
cd ../extensions/ringcurl
./gencode.sh
./buildgcc.sh
Generate RingZip Source Code and Build
cd ../extensions/ringzip
./gencode.sh
./buildgcc.sh
Generate RingLibuv Source Code and Build
We will build Libuv first
cd ../extensions/ringlibuv/libuv
sudo dnf install libtool m4 autoconf automake
sh autogen.sh
./configure
make
make check
sudo make install
Then we will build RingLibuv
cd ..
./gencode.sh
./buildgcc.sh
Generate RingFreeGLUT Source Code and Build
cd ../extensions/ringfreeglut
./gencode.sh
./buildgcc.sh
Generate RingOpenGL Source Code and Build
The ringopengl folder contains many sub folders for different OpenGL versions
Starting from OpenGL 1.1 to OpenGL 4.6
12.3. Building using Fedora Linux 161
Ring Documentation, Release 1.8
cd ../extensions/ringopengl/opengl21
gencode.sh
buildgcc.sh
Generate RingQt Source Code and Build
cd ../extensions/ringqt
./gencode.sh
./buildgccfedora.sh
To be able to call ring from any folder
cd ../../bin
sudo ./install.sh
Run Ring Notepad
cd applications/rnote
ring rnote.ring
12.4 Building using MacOS X
Get the source code
git clone http://github.com/ring-lang/ring.git
Install homebrew (follow the directions on homebrew’s homepage). Install Libraries
cd ring/src
./installdepmac.sh
Build Ring (Compiler/VM)
./buildclang.sh
Build Ring2EXE
cd ../ring2exe
sudo ./buildring2exe.sh
Build RingODBC
cd ../extensions/ringodbc
./buildclang.sh
Build RingMySQL
cd ../extensions/ringmysql
./buildclang.sh
Build RingSQLite
cd ../extensions/ringsqlite
./buildclang.sh
Build RingOpenSSL
cd ../extensions/ringopenssl
./buildclang.sh
12.4. Building using MacOS X 162
Ring Documentation, Release 1.8
Build RingInternet
cd ../extensions/ringinternet
./buildclang.sh
Build RingMurmurHash
cd ../extensions/ringmurmurhash
./buildclang.sh
Generate RingConsoleColors Source Code and Build
cd ../extensions/ringconsolecolors
./gencode.sh
./buildclang.sh
Generate RingAllegro Source Code and Build
cd ../extensions/ringallegro
./gencode.sh
./buildclang.sh
Generate RingLibCurl Source Code and Build
cd ../extensions/ringcurl
./gencode.sh
./buildclang.sh
Generate RingZip Source Code and Build
cd ../extensions/ringzip
./gencode.sh
./buildclang.sh
Generate RingLibuv Source Code and Build
cd ../extensions/ringlibuv
./gencode.sh
./buildclang.sh
Generate RingFreeGLUT Source Code and Build
cd ../extensions/ringfreeglut
./gencode.sh
./buildclang.sh
Generate RingOpenGL Source Code and Build
The ringopengl folder contains many sub folders for different OpenGL versions Starting from OpenGL 1.1 to OpenGL
4.6
cd ../extensions/ringopengl/opengl21
./gencode.sh
./buildclang.sh
Generate RingQt Source Code and Build
cd ../extensions/ringqt
./gencode.sh
./buildclang.sh
To be able to call ring from any folder
12.4. Building using MacOS X 163
Ring Documentation, Release 1.8
cd ../../bin
sudo ./install.sh
Run Ring Notepad
cd applications/rnote
sudo ring rnote.ring
12.5 Building using CMake
Install libraries (MySQL Client, OpenSSL, LibCurl, Allegro 5 and Qt 5.5)
cmake .
make
12.5. Building using CMake 164
CHAPTER
THIRTEEN
HOW TO CONTRIBUTE?
Ring is a free-open source project, Everyone is welcome to contribute to Ring.
Project Home : https://github.com/ring-lang/ring
You can help in many parts in the project
• Documentation
• Testing
• Samples
• Applications
• Editors Support
• Libraries in Ring
• Extensions in C/C++
• Compiler and Virtual Machine (VM)
• Ideas and suggestions
13.1 Special thanks to contributors
Throughout the creation of this project, Ring relied heavily on contributions from experts along with college students.
Their input was invaluable, and we want to take a moment to thank them and recognize them for all of their hard work.
Ring Team: http://ring-lang.sf.net/team.html
13.2 Documentation
You can modify anything in the documentation, by updating the text files (*.txt) in this folder : https://github.com/ring-
lang/ring/tree/master/docs/source
The documentation is created using Sphinx : http://www.sphinx-doc.org/en/stable/
13.3 Testing
You can write new tests in this folder
https://github.com/ring-lang/ring/tree/master/tests/scripts
165
Ring Documentation, Release 1.8
13.4 Samples
You can add new samples to this folder
https://github.com/ring-lang/ring/tree/master/samples/other
13.5 Applications
You can add new applications to this folder
https://github.com/ring-lang/ring/tree/master/applications
13.6 Editors Support
You can help in supporting Ring in different code editors
Check the next folder
https://github.com/ring-lang/ring/tree/master/editor
13.7 Libraries in Ring
You can update and add libraries to this folder
https://github.com/ring-lang/ring/tree/master/ringlibs
13.8 Extensions in C/C++
You can add and update extensions in this folder
https://github.com/ring-lang/ring/tree/master/extensions
13.9 Compiler and Virtual Machine (VM)
• Source Code (C Language) : https://github.com/ring-lang/ring/tree/master/src
• Visual Source (PWCT) : https://github.com/ring-lang/ring/tree/master/visualsrc
13.10 Ideas and suggestions
You can share your ideas, suggestions and questions in this group
https://groups.google.com/forum/#!forum/ring-lang
13.4. Samples 166
CHAPTER
FOURTEEN
GETTING STARTED - FIRST STYLE
14.1 Hello World
The next program prints the Hello World message on the screen (std-out).
see "Hello World"
14.2 Run the program
to run the program, save the code in a file, for example : hello.ring then from the command line or terminal, run it
using Ring
ring hello.ring
14.3 Create Executable File
Using Ring2EXE we can create executable file for our application
ring2exe hello.ring -static
14.4 Not Case-Sensitive
Since the Ring language is not case-sensitive, the same program can be written in different styles
Tip: It’s better to select one style and use it in all of the program source code
SEE "Hello World"
See "Hello World"
14.5 Multi-Line literals
Using Ring we can write multi-line literal, see the next example
167
Ring Documentation, Release 1.8
See "
Hello
Welcome to the Ring programming language
How are you?
"
Also you can use the nl variable to insert new line and you can use the + operator to concatenate strings
As we have NL for new lines, we have Tab and CR (Carriage return) too!
Note: nl value means a new line and the actual codes that represent a newline is different between operating systems
See "Hello" + nl + "Welcome to the Ring programming language" +
nl + "How are you?"
14.6 Getting Input
You can get the input from the user using the give command
See "What is your name? "
Give cName
See "Hello " + cName
14.7 No Explicit End For Statements
You don’t need to use ‘;’ or press ENTER to separate statements. The previous program can be written in one line.
See "What is your name? " give cName see "Hello " + cName
14.8 Using ? to print expression then new line
It’s common to print new line after printing an expression, We can use the ? operator to do that!
Example:
? "Hello, World!"
for x = 1 to 10
? x
next
Output:
Hello, World!
1
2
3
4
5
6
7
8
14.6. Getting Input 168
Ring Documentation, Release 1.8
9
10
14.9 Writing Comments
We can write one line comments and multi-line comments
The comment starts with # or //
Multi-lines comments are written between /* and */
/*
Program Name : My first program using Ring
Date : 2016.09.09
Author : Mahmoud Fayed
*/
See "What is your name? " # print message on screen
give cName # get input from the user
see "Hello " + cName # say hello!
// See "Bye!"
Note: Using // to comment a lines of code is just a code style.
14.9. Writing Comments 169
CHAPTER
FIFTEEN
GETTING STARTED - SECOND STYLE
15.1 Hello World
The next program prints the Hello World message on the screen (std-out).
put "Hello World"
15.2 Run the program
to run the program, save the code in a file, for example : hello.ring then from the command line or terminal, run it
using Ring
ring hello.ring
15.3 Create Executable File
Using Ring2EXE we can create executable file for our application
ring2exe hello.ring -static
15.4 Not Case-Sensitive
Since the Ring language is not case-sensitive, the same program can be written in different styles
Tip: It’s better to select one style and use it in all of the program source code
PUT "Hello World"
Put "Hello World"
15.5 Multi-Line literals
Using Ring we can write multi-line literal, see the next example
170

More Related Content

Similar to The Ring programming language version 1.8 book - Part 20 of 202 (20)

PDF
The Ring programming language version 1.7 book - Part 19 of 196
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.3 book - Part 16 of 184
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.6 book - Part 18 of 189
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.9 book - Part 22 of 210
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.2 book - Part 16 of 181
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.9 book - Part 23 of 210
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 24 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.2 book - Part 15 of 181
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.1 book - Part 15 of 180
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.3 book - Part 9 of 88
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.4 book - Part 17 of 185
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.3 book - Part 17 of 184
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.6 book - Part 17 of 189
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 23 of 212
Mahmoud Samir Fayed
 
PDF
His162013 140529214456-phpapp01
Getachew Ganfur
 
PDF
C++ for hackers
Franciny Salles
 
PDF
C plus plus for hackers it security
CESAR A. RUIZ C
 
PDF
The Ring programming language version 1.7 book - Part 18 of 196
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.7 book - Part 89 of 196
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.9 book - Part 89 of 210
Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 19 of 196
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 16 of 184
Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 18 of 189
Mahmoud Samir Fayed
 
The Ring programming language version 1.9 book - Part 22 of 210
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 16 of 181
Mahmoud Samir Fayed
 
The Ring programming language version 1.9 book - Part 23 of 210
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 24 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 15 of 181
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 15 of 180
Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 9 of 88
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.4 book - Part 17 of 185
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 17 of 184
Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 17 of 189
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 23 of 212
Mahmoud Samir Fayed
 
His162013 140529214456-phpapp01
Getachew Ganfur
 
C++ for hackers
Franciny Salles
 
C plus plus for hackers it security
CESAR A. RUIZ C
 
The Ring programming language version 1.7 book - Part 18 of 196
Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 89 of 196
Mahmoud Samir Fayed
 
The Ring programming language version 1.9 book - Part 89 of 210
Mahmoud Samir Fayed
 

More from Mahmoud Samir Fayed (20)

PDF
The Ring programming language version 1.10 book - Part 212 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 211 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 210 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 208 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 207 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 205 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 206 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 204 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 203 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 202 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 201 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 200 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 199 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 198 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 197 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 196 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 195 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 194 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 193 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 192 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 212 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 211 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 210 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 208 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 207 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 205 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 206 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 204 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 203 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 202 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 201 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 200 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 199 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 198 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 197 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 196 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 195 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 194 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 193 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 192 of 212
Mahmoud Samir Fayed
 
Ad

Recently uploaded (20)

PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Tally software_Introduction_Presentation
AditiBansal54083
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Ad

The Ring programming language version 1.8 book - Part 20 of 202

  • 1. Ring Documentation, Release 1.8 Build RingInternet cd ../extensions/ringinternet ./buildgcc.sh Build RingMurmurHash cd ../extensions/ringmurmurhash ./buildgcc.sh Generate RingConsoleColors Source Code and Build cd ../extensions/ringconsolecolors ./gencode.sh ./buildgcc.sh Generate RingAllegro Source Code and Build cd ../extensions/ringallegro ./gencode.sh ./buildgcc.sh Generate RingLibCurl Source Code and Build cd ../extensions/ringcurl ./gencode.sh ./buildgcc.sh Generate RingZip Source Code and Build cd ../extensions/ringzip ./gencode.sh ./buildgcc.sh Generate RingLibuv Source Code and Build We will build Libuv first cd ../extensions/ringlibuv/libuv sudo dnf install libtool m4 autoconf automake sh autogen.sh ./configure make make check sudo make install Then we will build RingLibuv cd .. ./gencode.sh ./buildgcc.sh Generate RingFreeGLUT Source Code and Build cd ../extensions/ringfreeglut ./gencode.sh ./buildgcc.sh Generate RingOpenGL Source Code and Build The ringopengl folder contains many sub folders for different OpenGL versions Starting from OpenGL 1.1 to OpenGL 4.6 12.3. Building using Fedora Linux 161
  • 2. Ring Documentation, Release 1.8 cd ../extensions/ringopengl/opengl21 gencode.sh buildgcc.sh Generate RingQt Source Code and Build cd ../extensions/ringqt ./gencode.sh ./buildgccfedora.sh To be able to call ring from any folder cd ../../bin sudo ./install.sh Run Ring Notepad cd applications/rnote ring rnote.ring 12.4 Building using MacOS X Get the source code git clone http://github.com/ring-lang/ring.git Install homebrew (follow the directions on homebrew’s homepage). Install Libraries cd ring/src ./installdepmac.sh Build Ring (Compiler/VM) ./buildclang.sh Build Ring2EXE cd ../ring2exe sudo ./buildring2exe.sh Build RingODBC cd ../extensions/ringodbc ./buildclang.sh Build RingMySQL cd ../extensions/ringmysql ./buildclang.sh Build RingSQLite cd ../extensions/ringsqlite ./buildclang.sh Build RingOpenSSL cd ../extensions/ringopenssl ./buildclang.sh 12.4. Building using MacOS X 162
  • 3. Ring Documentation, Release 1.8 Build RingInternet cd ../extensions/ringinternet ./buildclang.sh Build RingMurmurHash cd ../extensions/ringmurmurhash ./buildclang.sh Generate RingConsoleColors Source Code and Build cd ../extensions/ringconsolecolors ./gencode.sh ./buildclang.sh Generate RingAllegro Source Code and Build cd ../extensions/ringallegro ./gencode.sh ./buildclang.sh Generate RingLibCurl Source Code and Build cd ../extensions/ringcurl ./gencode.sh ./buildclang.sh Generate RingZip Source Code and Build cd ../extensions/ringzip ./gencode.sh ./buildclang.sh Generate RingLibuv Source Code and Build cd ../extensions/ringlibuv ./gencode.sh ./buildclang.sh Generate RingFreeGLUT Source Code and Build cd ../extensions/ringfreeglut ./gencode.sh ./buildclang.sh Generate RingOpenGL Source Code and Build The ringopengl folder contains many sub folders for different OpenGL versions Starting from OpenGL 1.1 to OpenGL 4.6 cd ../extensions/ringopengl/opengl21 ./gencode.sh ./buildclang.sh Generate RingQt Source Code and Build cd ../extensions/ringqt ./gencode.sh ./buildclang.sh To be able to call ring from any folder 12.4. Building using MacOS X 163
  • 4. Ring Documentation, Release 1.8 cd ../../bin sudo ./install.sh Run Ring Notepad cd applications/rnote sudo ring rnote.ring 12.5 Building using CMake Install libraries (MySQL Client, OpenSSL, LibCurl, Allegro 5 and Qt 5.5) cmake . make 12.5. Building using CMake 164
  • 5. CHAPTER THIRTEEN HOW TO CONTRIBUTE? Ring is a free-open source project, Everyone is welcome to contribute to Ring. Project Home : https://github.com/ring-lang/ring You can help in many parts in the project • Documentation • Testing • Samples • Applications • Editors Support • Libraries in Ring • Extensions in C/C++ • Compiler and Virtual Machine (VM) • Ideas and suggestions 13.1 Special thanks to contributors Throughout the creation of this project, Ring relied heavily on contributions from experts along with college students. Their input was invaluable, and we want to take a moment to thank them and recognize them for all of their hard work. Ring Team: http://ring-lang.sf.net/team.html 13.2 Documentation You can modify anything in the documentation, by updating the text files (*.txt) in this folder : https://github.com/ring- lang/ring/tree/master/docs/source The documentation is created using Sphinx : http://www.sphinx-doc.org/en/stable/ 13.3 Testing You can write new tests in this folder https://github.com/ring-lang/ring/tree/master/tests/scripts 165
  • 6. Ring Documentation, Release 1.8 13.4 Samples You can add new samples to this folder https://github.com/ring-lang/ring/tree/master/samples/other 13.5 Applications You can add new applications to this folder https://github.com/ring-lang/ring/tree/master/applications 13.6 Editors Support You can help in supporting Ring in different code editors Check the next folder https://github.com/ring-lang/ring/tree/master/editor 13.7 Libraries in Ring You can update and add libraries to this folder https://github.com/ring-lang/ring/tree/master/ringlibs 13.8 Extensions in C/C++ You can add and update extensions in this folder https://github.com/ring-lang/ring/tree/master/extensions 13.9 Compiler and Virtual Machine (VM) • Source Code (C Language) : https://github.com/ring-lang/ring/tree/master/src • Visual Source (PWCT) : https://github.com/ring-lang/ring/tree/master/visualsrc 13.10 Ideas and suggestions You can share your ideas, suggestions and questions in this group https://groups.google.com/forum/#!forum/ring-lang 13.4. Samples 166
  • 7. CHAPTER FOURTEEN GETTING STARTED - FIRST STYLE 14.1 Hello World The next program prints the Hello World message on the screen (std-out). see "Hello World" 14.2 Run the program to run the program, save the code in a file, for example : hello.ring then from the command line or terminal, run it using Ring ring hello.ring 14.3 Create Executable File Using Ring2EXE we can create executable file for our application ring2exe hello.ring -static 14.4 Not Case-Sensitive Since the Ring language is not case-sensitive, the same program can be written in different styles Tip: It’s better to select one style and use it in all of the program source code SEE "Hello World" See "Hello World" 14.5 Multi-Line literals Using Ring we can write multi-line literal, see the next example 167
  • 8. Ring Documentation, Release 1.8 See " Hello Welcome to the Ring programming language How are you? " Also you can use the nl variable to insert new line and you can use the + operator to concatenate strings As we have NL for new lines, we have Tab and CR (Carriage return) too! Note: nl value means a new line and the actual codes that represent a newline is different between operating systems See "Hello" + nl + "Welcome to the Ring programming language" + nl + "How are you?" 14.6 Getting Input You can get the input from the user using the give command See "What is your name? " Give cName See "Hello " + cName 14.7 No Explicit End For Statements You don’t need to use ‘;’ or press ENTER to separate statements. The previous program can be written in one line. See "What is your name? " give cName see "Hello " + cName 14.8 Using ? to print expression then new line It’s common to print new line after printing an expression, We can use the ? operator to do that! Example: ? "Hello, World!" for x = 1 to 10 ? x next Output: Hello, World! 1 2 3 4 5 6 7 8 14.6. Getting Input 168
  • 9. Ring Documentation, Release 1.8 9 10 14.9 Writing Comments We can write one line comments and multi-line comments The comment starts with # or // Multi-lines comments are written between /* and */ /* Program Name : My first program using Ring Date : 2016.09.09 Author : Mahmoud Fayed */ See "What is your name? " # print message on screen give cName # get input from the user see "Hello " + cName # say hello! // See "Bye!" Note: Using // to comment a lines of code is just a code style. 14.9. Writing Comments 169
  • 10. CHAPTER FIFTEEN GETTING STARTED - SECOND STYLE 15.1 Hello World The next program prints the Hello World message on the screen (std-out). put "Hello World" 15.2 Run the program to run the program, save the code in a file, for example : hello.ring then from the command line or terminal, run it using Ring ring hello.ring 15.3 Create Executable File Using Ring2EXE we can create executable file for our application ring2exe hello.ring -static 15.4 Not Case-Sensitive Since the Ring language is not case-sensitive, the same program can be written in different styles Tip: It’s better to select one style and use it in all of the program source code PUT "Hello World" Put "Hello World" 15.5 Multi-Line literals Using Ring we can write multi-line literal, see the next example 170