Professional Documents
Culture Documents
The Ring Programming Language Version 1.7 Book - Part 9 of 196
The Ring Programming Language Version 1.7 Book - Part 9 of 196
6. QRegion Class
7. QCoreApplication class
Output:
one
two
three
Output:
one
two
three
The next example count from 1 to 10 in the same line during 10 seconds
load "stdlibcore.ring"
for x = 1 to 10 see x sleep(1) see cr next
Output
True!
• and
• or
• not
Now we have also the next operators
• &&
• ||
• !
Example:
if one() and two()
see "Test1 - Fail" + nl
else
see "Test1 - Pass" + nl
ok
if two() or one()
see "Test2 - Pass" + nl
else
see "Test2 - Fail" + nl
ok
if two() || one()
see "Test4 - Pass" + nl
else
see "Test4 - Fail" + nl
ok
Output:
Test1 - Pass
Test2 - Pass
Test3 - Pass
Test4 - Pass
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
9
10
SIX
In this chapter we will learn about the changes and new features in Ring 1.5 release.
57
Ring Documentation, Release 1.7
1. Ring Notepad is updated to include some new styles and the Main File ToolBar
The idea of the Main File ToolBar is to determine the main file in the project When the project contains many source
code files
This way you can run the project ( Main File ) at any time while opening other files in the project without the need to
switch to the Main File to run the project.
To quickly use this feature
(Open the project main file)
Press Ctrl+Shift+M to set the current source code file as the main file
Open and modify other source code files in the project
To run the project (Main File) at any time press Ctrl+Shift+F5 (GUI) or Ctrl+Shift+D (Console)
Screen Shots:
2. The output window is updated to display the new lines correctly and contains the “Clear” button.
Screen Shot:
(3) The Ring Notepad is updated to quickly open and switch between large files while preparing the functions/classes
lists in the background.
Screen Shot: