Boost PC performance: How more available memory can improve productivity
The Ring programming language version 1.4.1 book - Part 30 of 31
1. Ring Documentation, Release 1.4.1
Operation Description
• ICO_PUSHC
Add string from the IR to the stack
• ICO_PUSHN
Add number from the IR to the stack
• ICO_PUSHV
Replace VP in the stack[nSize] with the variable value
• ICO_LOADADDRESS
Read variable name from the IR, push VP to the stack
• ICO_ASSIGNMENT
Stack[nSize-1] VV = Stack[nSize] VV , POP
Stack[nSize]
• ICO_INC
Increment Number in Stack[nSize] by 1
• ICO_LOADAPUSHV
The same as ICO_LOADADDRESS then ICO_PUSHV
• ICO_NEWLINE
Store new line number (debug info)
• ICO_FREESTACK
Remove all items from the stack , nSize = 0
• ICO_FILENAME
Store the source code file name (debug info)
• ICO_FREELOADASCOPE
Free the Scope List of the current Expression
(Jump)
Operation Description
• ICO_JUMP
Set PC to new value from the IR
• ICO_JUMPZERO
If Stack[nSize] is a number = 0 then Set PC to new value
from the IR
• ICO_JUMPFOR
End of for loop
• ICO_JUMPONE
If Stack[nSize] is a number = 1 then Set PC to new value
from the IR
• ICO_JUMPZERO2
As ICO_JUMPZERO but add 1 to the stack (required
for many ‘AND’ conditions)
• ICO_JUMPONE2
As ICO_JUMPONE but add 1 to the stack (required for
many ‘OR’ conditions)
(Compare)
72.6. Virtual Machine (VM) Instructions 848
2. Ring Documentation, Release 1.4.1
Operation Description
• ICO_LESSEQUAL
If stack[nSize-1] <= stack[nSize] , POP stack[nSize], set
Stack[nSize-1] = 1 else set Stack[nSize-1] = 0
• ICO_EQUAL
If stack[nSize-1] = stack[nSize] , POP stack[nSize], set
Stack[nSize-1] = 1 else set Stack[nSize-1] = 0
• ICO_LESS
If stack[nSize-1] < stack[nSize] , POP stack[nSize], set
Stack[nSize-1] = 1 else set Stack[nSize-1] = 0
• ICO_GREATER
If stack[nSize-1] > stack[nSize] , POP stack[nSize], set
Stack[nSize-1] = 1 else set Stack[nSize-1] = 0
• ICO_GREATEREQUAL
If stack[nSize-1] >= stack[nSize] , POP stack[nSize], set
Stack[nSize-1] = 1 else set Stack[nSize-1] = 0
• ICO_NOTEQUAL
If stack[nSize-1] != stack[nSize] , POP stack[nSize], set
Stack[nSize-1] = 1 else set Stack[nSize-1] = 0
(Math)
Operation Description
• ICO_SUM
Stack[nSize-1] = Stack[nSize-1] + Stack[nSize] , POP
stack[nSize]
• ICO_SUB
Stack[nSize-1] = Stack[nSize-1] - Stack[nSize] , POP
stack[nSize]
• ICO_MUL
Stack[nSize-1] = Stack[nSize-1] * Stack[nSize] , POP
stack[nSize]
• ICO_DIV
Stack[nSize-1] = Stack[nSize-1] / Stack[nSize] , POP
stack[nSize]
• ICO_MOD
Stack[nSize-1] = Stack[nSize-1] % Stack[nSize] , POP
stack[nSize]
• ICO_NEG
Stack[nSize] = - Stack[nSize-1]
• ICO_PLUSPLUS
Stack[nSize] = Stack[nSize] + 1
• ICO_MINUSMINUS
Stack[nSize] = Stack[nSize] - 1
(Logic)
Operation Description
• ICO_AND
Stack[nSize-1] = Stack[nSize-1] && Stack[nSize] ,
POP stack[nSize]
• ICO_OR
Stack[nSize-1] = Stack[nSize-1] || Stack[nSize] , POP
stack[nSize]
• ICO_NOT
Stack[nSize] = ! Stack[nSize]
(Lists)
72.6. Virtual Machine (VM) Instructions 849
3. Ring Documentation, Release 1.4.1
Operation Description
• ICO_LISTSTART
Start New List in Temp. Memory
• ICO_LISTITEM
Add List Item
• ICO_LISTEND
End List
• ICO_LOADINDEXADDRESS
Stack[nSize-1] = Stack[nSize-1] VV [ Stack[nSize] ] ,
POP stack[nSize]
(Functions)
Operation Description
• ICO_LOADFUNC
Find function
• ICO_CALL
Call function
• ICO_RETURN
Return from function
• ICO_RETNULL
Return NULl from function
• ICO_RETFROMEVAL
Return after eval()
• ICO_RETITEMREF
Return the list item reference - not the value
• ICO_NEWFUNC
Start new function
• ICO_BLOCKFLAG
Flag to determine where to jump later (after
ICO_RETURN)
• ICO_FUNCEXE
Start executing function
• ICO_ENDFUNCEXE
End function execution
• ICO_ANONYMOUS
Anonymous function
(User Interface)
Operation Description
• ICO_PRINT
Print value to the standard output
• ICO_GIVE
Get input from the keyboard
(End Program/Loop)
72.6. Virtual Machine (VM) Instructions 850
4. Ring Documentation, Release 1.4.1
Operation Description
• ICO_BYE
End execution of VM
• ICO_EXITMARK
Place to exit to from a loop
• ICO_POPEXITMARK
Remove exit mark
• ICO_EXIT
Break from one loop or more
• ICO_LOOP
Continue to next loop
(For Better Performance)
Operation Description
• ICO_PUSHP
Push pointer to the stack
• ICO_INCP
Increment variable value using pointer
• ICO_PUSHPV
Push value of variable using variable pointer
• ICO_INCJUMP
Increment then jump
• ICO_INCPJUMP
Increment using pointer then jump
• ICO_JUMPVARLENUM
Jump if variable value is <= numeric value
• ICO_JUMPVARPLENUM
Jump if variable value (using pointer) <= numeric value
• ICO_LOADFUNCP
Push function pointer
• ICO_PUSHPLOCAL
Push pointer to local variable
• ICO_INCLPJUMP
Increment value using pointer to local variable then
jump
• ICO_JUMPVARLPLENUM
Jump if the variable value (using pointer) <= numeric
value
• ICO_INCPJUMPSTEP1
Increment value using variable pointer then jump (for
loop step = 1)
• ICO_JUMPVARPLENUMSTEP1
Increment value using variable pointer then jump (for
loop step = 1)
(Try-Catch-Done)
72.6. Virtual Machine (VM) Instructions 851
5. Ring Documentation, Release 1.4.1
Operation Description
• ICO_TRY
Start try region
• ICO_DONE
End try region
(Duplicate and Range)
Operation Description
• ICO_DUPLICATE
Duplicate stack value
• ICO_RANGE
Create list from value to value
(OOP)
Operation Description
• ICO_NEWOBJ
Create new object, get class name from the IR, push ob-
ject pointer to the stack.
• ICO_SETSCOPE
Called after creating new object, set the active scope to
be the object scope.
• ICO_LOADSUBADDRESS
Get object attribute, push the pointer to the stack.
• ICO_LOADMETHOD
Find object method
• ICO_AFTERCALLMETHOD
Used after calling a method - normal case
• ICO_AFTERCALLMETHOD2
Used after calling a method - second case
• ICO_NEWCLASS
Start new class region
• ICO_BRACESTART
Open brace
• ICO_BRACEEND
End brace
• ICO_IMPORT
Import package
• ICO_PRIVATE
start private attributes region
• ICO_SETPROPERTY
set attribute value - check for setter.
• ICO_CALLCLASSINIT
call call init() method.
(Other)
72.6. Virtual Machine (VM) Instructions 852
6. Ring Documentation, Release 1.4.1
Operation Description
• ICO_SETREFERENCE
Copy by reference
• ICO_KILLREFERENCE
Remove reference
• ICO_ASSIGNMENTPOINTER
Determine the left side variable
• ICO_BEFOREEQUAL
Determine operators like += , -= , ... etc
(Bitwise Operators)
Operation Description
• ICO_BITAND
Stack[nSize-1] = Stack[nSize-1] & Stack[nSize] , POP
stack[nSize]
• ICO_BITOR
Stack[nSize-1] = Stack[nSize-1] | Stack[nSize] , POP
stack[nSize]
• ICO_BITXOR
Stack[nSize-1] = Stack[nSize-1] ^ Stack[nSize] , POP
stack[nSize]
• ICO_BITNOT
Stack[nSize] = ! Stack[nSize]
• ICO_BITSHL
Stack[nSize-1] = Stack[nSize-1] << Stack[nSize] , POP
stack[nSize]
• ICO_BITSHR
Stack[nSize-1] = Stack[nSize-1] >> Stack[nSize] , POP
stack[nSize]
(For Step)
Operation Description
• ICO_STEPNUMBER
Determine step number in for loop
• ICO_POPSTEP
POP step number from steps stack
• ICO_LOADAFIRST
Load the first address of variable name
72.6. Virtual Machine (VM) Instructions 853
7. CHAPTER
SEVENTYTHREE
RESOURCES
In this section you will find resources about the language
73.1 Ring Language Website
For news about the language check the website
http://ring-lang.net
http://ring-lang.sf.net
73.2 Ring Group
For questions use the Ring Group (English)
https://groups.google.com/forum/#!forum/ring-lang
73.3 Contact the Authors
Name : Eng. Mahmoud Samir Fayed
Country : Egypt
Email : msfclipper@yahoo.com
Facebook : https://facebook.com/mahmoudfayed1986
LinkedIn : https://sa.linkedin.com/in/mahmoudfayed1986
Name : Dr. Atif M. Alamri
Country : Saudi Arabia
Email : atif@ksu.edu.sa
LinkedIn : https://sa.linkedin.com/in/dr-atif-alamri-8b341747
Ring Team : http://ring-lang.sourceforge.net/team.html
854
8. INDEX
Access List Items by String Index
Lists, 126
Access Objects Using Braces
Object Oriented Programming, 202
Access String Letters
Strings, 128
Accessing the class attributes from braces inside class
methods
Scope Rules, 552
Add Items
Lists, 120
addattribute()
Reflection and Meta-programming, 229
AddDays()
Date and Time, 136
Adding code to the generated code
Code Generator, 618
Adding Hyperlink to QLabel
Desktop and Mobile Development, 459
addmethod()
Reflection and Meta-programming, 229
Analog Clock
Applications developed in little hours, 4
Animate Class
Game Engine for 2D Games, 380
Animate Events
Game Engine for 2D Games, 391
Animation
Game Engine for 2D Games, 385
Animation and Functions
Game Engine for 2D Games, 386
Anonymous and Nested Functions
Functional Programming, 215
Application Class
Web Development (CGI Library), 344
Applications
How to contribute?, 73
Applications developed in little hours
Analog Clock, 4
FetchStockData Application, 2
Fifteen Puzzle Game, 3
Fifteen Puzzle Game 2, 6
Introduction, 1
Quotes about Ring, 1
Samples in this book, 7
Squares Puzzle Game, 4
TicTacToe Game, 3
Werdy Application, 5
apppath()
Stdlib Functions, 236
Arithmetic Operators
Operators, 95
Ascii()
Data Type, 144
Assert()
Eval() and Debugging, 169
Assignment Operators
Operators, 96
attributes()
Reflection and Meta-programming, 226
Better Call Command
What is new in Ring 1.2?, 55
Better Code Generator for Extensions
What is new in Ring 1.1?, 65
Better Documentation
What is new in Ring 1.1?, 65
Better Functions
What is new in Ring 1.2?, 52
Better Loop|Exit Command
What is new in Ring 1.3?, 46
Better Natural Language Programming Support
What is new in Ring 1.1?, 57
Better Quality
What is new in Ring 1.2?, 55
Better Ring Notepad
What is new in Ring 1.2?, 52
What is new in Ring 1.3?, 42
Better RingQt
What is new in Ring 1.2?, 52
What is new in Ring 1.3?, 38
What is new in Ring 1.4.1?, 27
What is new in Ring 1.4?, 36
Better Scripts for Building from Source Code
What is new in Ring 1.4.1?, 25
855
9. Ring Documentation, Release 1.4.1
Better StdLib
What is new in Ring 1.3?, 46
What is new in Ring 1.4.1?, 26
What is new in Ring 1.4?, 34
Better WebLib
What is new in Ring 1.4?, 34
binarydigits()
Stdlib Functions, 245
Bitwise Operators
Operators, 95
BraceError() Method
Natural Language Programming, 287
BraceExprEval Method
Natural Language Programming, 286
BraceStart and BraceEnd Methods
Natural Language Programming, 285
Branching
Control Structures, 98
Control Structures - Second Style, 105
Control Structures - Third Style, 108
Building From Source Code
Building using CMake, 71
Building using MacOS X, 69
Building using Microsoft Windows, 67
Building using Ubuntu Linux, 68
Introduction, 66
Building Games For Android
Building the project, 427
Download Requirements and Update the Android
SDK, 426
Introduction, 425
Project Folder, 426
Building RingQt Applications for Mobile
Comments about developing for Android using
RingQt, 531
Download Requirements, 530
Install Qt for Android, 530
Introduction, 529
Update the Android SDK, 530
Building the project
Building Games For Android, 427
Building using CMake
Building From Source Code, 71
Building using MacOS X
Building From Source Code, 69
Building using Microsoft Windows
Building From Source Code, 67
Building using Ubuntu Linux
Building From Source Code, 68
Call Functions
Functions, 115
callgc()
Low Level Functions, 591
Calling a function sharing the name with a method in the
current class
Scope Rules for Functions and Methods, 563
Can I connect to dbase/harbour database?
Frequently Asked Questions, 834
Can Ring work on Windows XP?
Frequently Asked Questions, 836
capitalized()
Stdlib Functions, 239
cfunctions()
Reflection and Meta-programming, 219
CGI Support
Command Line Options, 589
Change Focus
Desktop and Mobile Development, 494
Change Language Keywords
Syntax Flexibility, 565
Change Language Operators
Syntax Flexibility, 566
Change the ’=’ operator to ’is’
Natural Language Programming, 283
Change the Ring Keyword ’And’
Natural Language Programming, 281
Change the Ring Operator ’+’
Natural Language Programming, 282
Change: Basic Extensions are separated from RingVM
What is new in Ring 1.4?, 29
changestring()
Stdlib Functions, 247
Char()
Data Type, 144
ChDir() Function
System Functions, 166
Check Character
Data Type, 139
Check Data Type
Data Type, 138
Check Parameters Count
Extension, 605
Check Parameters Type
Extension, 606
Classes and Objects
Object Oriented Programming, 200
Classes and their Methods to use the default events
Desktop and Mobile Development, 524
classes()
Reflection and Meta-programming, 223
classname()
Reflection and Meta-programming, 225
Clean Natural Code
Natural Language Programming, 288
Clearerr()
Files, 156
clock()
Index 856
10. Ring Documentation, Release 1.4.1
Date and Time, 134
Close Window Event
RingLibSDL, 372
ClosPerSecond()
Date and Time, 134
Code Generator
Adding code to the generated code, 618
Comments in configuration file, 620
Configuration file, 616
Configuration file for the Allegro library, 621
Configuration Files Examples, 634
Defining Constants, 619
Determine Structure Members Types, 619
Enum and Numbers, 620
Executing code during code generation, 620
Filtering using Expressions, 620
function prototype, 616
Introduction, 615
Prefix for Functions Names, 618
Qt configuration file, 624
Register New Functions, 619
Threads Support, 622
Using configuration file that wrap C++ library, 624
Using the tool, 616
Wrap structures, 618
Wrapping C++ Classes, 623
CodeEditor Class
RingQt Classes Reference, 788
Command Line Options
CGI Support, 589
Generate Object File, 590
Introduction, 575
No Run, 589
Performance, 589
Printing Final Intermediate Code, 584
Printing Instruction Operation Code, 589
Printing Intermediate Code, 582
Printing Rules, 578
Printing Tokens, 576
Comments about developing for Android using RingQt
Building RingQt Applications for Mobile, 531
Comments about evaluation
Control Structures - First Style, 103
Comments in configuration file
Code Generator, 620
Compact Syntax
Language Design, 20
Compiler and Virtual Machine (VM)
How to contribute?, 73
Compiler Errors
Reference, 843
Composition
Object Oriented Programming, 203
Configuration file
Code Generator, 616
Configuration file for the Allegro library
Code Generator, 621
Configuration Files Examples
Code Generator, 634
Configure the Apache web server
Web Development (CGI Library), 297
Conflict between Class Attributes and Local Variables
Scope Rules, 549
Conflict between Global Variables and Class Attributes
Frequently Asked Questions, 822
Scope Rules, 548
Conflict between self inside braces and self in the class
region
Scope Rules, 555
Constructor methods in Ring
Frequently Asked Questions, 818
Contact the Autor
Resources, 854
Control Structures
Branching, 98
Looping, 109
Control Structures - First Style
Comments about evaluation, 103
Do Again Loop, 101
Exit, 101
Exit from two loops, 101
Exit/Loop inside sub functions, 102
For In Loop, 100
for in to modify lists, 100
For Loop, 99
Introduction, 97
Loop Command, 102
Looping, 99
Short-circuit evaluation, 102
Step Option, 100
Switch Statement, 98
While Loop, 99
Control Structures - Second Style
Branching, 105
Exceptions, 107
For In Loop, 107
For Loop, 106
If Statement, 105
Introduction, 104
Looping, 106
Switch Statement, 105
Control Structures - Third Style
Branching, 108
Exceptions, 111
For In Loop, 111
For Loop, 110
If Statement, 108
Introduction, 107
Index 857
11. Ring Documentation, Release 1.4.1
Switch Statement, 108
While Loop, 109
Conversion
Data Type, 143
Conversion Class
Stdlib Classes, 268
Convert between Numbers and Bytes
What is new in Ring 1.4?, 33
Convert Letters Case
Strings, 128
Cookies
Web Development (CGI Library), 309
Copy Lists
Lists, 124
Copy()
Strings, 130
Could you explain the output of the StrCmp() function?
Frequently Asked Questions, 825
Create Database
MySQL Functions, 184
Create Lists
Lists, 120
Create Table and Insert Data
MySQL Functions, 185
Create Window
RingLibSDL, 369
Create Zip File
RingZip, 353
Creating a Class for each Window in GUI applications
Scope Rules, 554
Creating Menubar
Desktop and Mobile Development, 439
Creating more than one window
Desktop and Mobile Development, 477
Creating StatusBar
Desktop and Mobile Development, 443
Creating the Game Window
Game Engine for 2D Games, 380
Creating Toolbar
Desktop and Mobile Development, 442
Creating Windows Installer
Distributing Ring Application, 574
CRUD Example using MVC
Web Development (CGI Library), 330
CurrentDir() Function
System Functions, 165
Data Type
Ascii(), 144
Char(), 144
Check Character, 139
Check Data Type, 138
Conversion, 143
Dec(), 144
Hex(), 144
Hex2str(), 145
Introduction, 137
IsAlNum(), 140
IsAlpha(), 140
IsCntrl(), 140
IsDigit(), 141
IsGraph(), 141
IsList(), 139
IsLower(), 141
IsNULL(), 139
IsNumber(), 138
IsPrint(), 141
IsPunct(), 142
IsSpace(), 142
IsString(), 138
IsUpper(), 142
IsXdigit(), 142
Number(), 143
Str2Hex(), 145
String(), 143
Type(), 139
Database, ModelBase & ControllerBase classes
Web Development (CGI Library), 338
DataType Class
Stdlib Classes, 267
Date and Time
AddDays(), 136
clock(), 134
ClosPerSecond(), 134
Date(), 134
DiffDays(), 136
EpochTime(), 136
Introduction, 133
Time(), 134
TimeList(), 135
Date()
Date and Time, 134
DateTime Class
Stdlib Classes, 262
dayofweek()
Stdlib Functions, 246
Debug Class
Stdlib Classes, 266
Dec()
Data Type, 144
Decimals()
Mathematical Functions, 149
Declarative Programming
Declarative programming on the top of Object-
Oriented, 277
executing code after the end of object access, 277
Introduction, 273
More Beatiful Code, 278
Index 858
12. Ring Documentation, Release 1.4.1
Objects inside lists, 274
Return object by reference, 275
Declarative programming on the top of Object-Oriented
Declarative Programming, 277
Declare parameters
Functions, 116
Decrypt()
Security and Internet Functions, 198
Deep Copy
Variables, 93
Define Declarative Languages
Language Design, 23
Define Functions
Functions, 115
Define Natural Statements
Language Design, 21
Defining Commands
Using the Natural Library, 292
Defining commands using classes
Using the Natural Library, 295
Defining Constants
Code Generator, 619
Defining Variables and Variables Access
Scope Rules, 546
Delete Item From List
Lists, 121
Demo Programs
Introduction, 169
Language Shell, 170
Main Menu, 170
The Cards Game, 518
Designed for a clear goal
Language Design, 16
Desktop and Mobile Development
Adding Hyperlink to QLabel, 459
Change Focus, 494
Classes and their Methods to use the default events,
524
Creating Menubar, 439
Creating more than one window, 477
Creating StatusBar, 443
Creating Toolbar, 442
Dialog Functions, 484
Display Image using QLabel, 463
Display Scaled Image using QLabel, 472
Drawing using QPainter, 474
Dynamic Objects, 498
Inheritance from GUI Classes, 490
KeyPress and Mouse Move Events, 484
Menubar and StyleSheet Example, 464
Methods to use Events with Events Filter, 527
Movable Label Example, 480
Moving Objects using the Mouse, 486
New Classes names - Index Start from 1, 529
Notepad Application, 503
Other Widgets Events, 468
Playing Sound, 478
Printing using QPrinter, 476
QLineEdit Events and QMessageBox, 466
QMessagebox Example, 481
QVideoWidget and QMediaPlayer, 460
Regular Expressions, 495
RingQt Classes and their Qt Documentation, 529
Rotate Text, 492
Simple Client and Server Example, 496
The Cards Game, 518
The Difference between Qt and RingQt, 528
The First GUI Application, 429
Using Layout, 430
Using QCheckBox, 456
Using QComboBox Class, 438
Using QDateEdit, 451
Using QDesktopWidget Class, 491
Using QDial, 452
Using QDockWidget, 444
Using QFrame, 461
Using QInputDialog Class, 482
Using qLCDNumber, 479
Using QProgressBar, 448
Using QProgressBar and Timer, 471
Using QRadioButton and QButtonGroup, 457
Using QSlider, 449
Using QSpinBox, 449
Using QTableWidget, 447
Using QTabWidget, 445
Using QTreeView and QFileSystemModel, 436
Using QTreeWidget and QTreeWidgetItem, 437
Using QWebView, 455
Using the QColorDialog Class, 478
Using the QFileDialog Class, 473
Using the QListWidget Class, 433
Using the QTextEdit Class, 432
Using the QTimer Class, 470
Weight History Application, 499
Determine Structure Members Types
Code Generator, 619
Dialog Functions
Desktop and Mobile Development, 484
DiffDays()
Date and Time, 136
Dir()
Files, 152
direxists()
Stdlib Functions, 248
Display Error Message
Extension, 606
Display Image
RingLibSDL, 369
Index 859
13. Ring Documentation, Release 1.4.1
Display Image using QLabel
Desktop and Mobile Development, 463
Display PNG Images
RingLibSDL, 370
Display Scaled Image using QLabel
Desktop and Mobile Development, 472
Display Transparent Images
RingLibSDL, 371
Display Warnings Option
What is new in Ring 1.2?, 55
Distributing Applications and Games for Mobile
Distributing Ring Application, 575
Distributing Applications for Microsoft Windows
Distributing Ring Application, 574
Distributing Ring Application
Creating Windows Installer, 574
Distributing Applications and Games for Mobile,
575
Distributing Applications for Microsoft Windows,
574
Introduction, 573
Protecting the Source Code, 574
Using C/C++ Compiler and Linker, 575
Do Again Loop
Control Structures - First Style, 101
Documentation
How to contribute?, 72
Download Requirements
Building RingQt Applications for Mobile, 530
Download Requirements and Update the Android SDK
Building Games For Android, 426
Download()
Security and Internet Functions, 199
Draw Rectangle
RingLibSDL, 370
Drawing Text
Game Engine for 2D Games, 381
Drawing using QPainter
Desktop and Mobile Development, 474
Drawing, Animation and Input
Graphics and Game Programming, 356
Dynamic Attributes
Object Oriented Programming, 207
Dynamic Objects
Desktop and Mobile Development, 498
Dynamic Typing
Variables, 93
Editors Support
How to contribute?, 73
Embedding Ring in Ring
Embedding Ring in Ring without sharing the State,
601
Introduction, 600
Serial Execution of Programs, 601
Embedding Ring in Ring without sharing the State
Embedding Ring in Ring, 601
What is new in Ring 1.3?, 48
Embedding Ring Language in C/C++ Programs
Introduction, 612
Ring State, 613
Ring State Functions, 613
Ring State Variables, 614
Encourage Organization
Language Design, 18
Encrypt()
Security and Internet Functions, 197
endswith()
Stdlib Functions, 242
Entering Items
Form Designer, 544
Enum and Numbers
Code Generator, 620
EpochTime()
Date and Time, 136
Stdlib Functions, 249
Equality of functions
Functional Programming, 216
Eval()
Eval() and Debugging, 167
Eval() and Debugging
Assert(), 169
Eval(), 167
Introduction, 166
Raise(), 168
Try/Carch/Done, 167
evenorodd()
Stdlib Functions, 243
Events Code
Form Designer, 540
Example
Files, 158
Mathematical Functions, 146
Natural Language Programming, 280
Objects Library for RingQt Application, 533
Security and Internet Functions, 198
System Functions, 163
Example about Sharing Names between Functions and
Methods
Scope Rules for Functions and Methods, 561
Exceptions
Control Structures - Second Style, 107
Control Structures - Third Style, 111
Execute Query and Print Result
ODBC Functions, 178
executing code after the end of object access
Declarative Programming, 277
Executing code during code generation
Index 860
14. Ring Documentation, Release 1.4.1
Code Generator, 620
ExeFileName() Function
System Functions, 166
ExeFolder() Function
System Functions, 166
Exit
Control Structures - First Style, 101
Exit from two loops
Control Structures - First Style, 101
Exit/Loop inside sub functions
Control Structures - First Style, 102
Extension
Check Parameters Count, 605
Check Parameters Type, 606
Display Error Message, 606
Fopen() and Fclose() Implementation, 607
Function Prototype, 607
Function Structure, 605
Get Parameters Values, 606
Introduction, 602
Module Organization, 604
MySQL_Columns() Implementation, 610
Return Value, 606
RING API - list Functions, 608
RING API - String Functions, 610
ring_ext.c, 603
ring_ext.h, 603
Shared Libraries, 611
Sin() Implementation, 607
Extensions in C/C++
How to contribute?, 73
Extract Zip File
RingZip, 353
Facebook Login
RingLibCurl, 349
factorial()
Stdlib Functions, 240
factors()
Stdlib Functions, 244
Fclose()
Files, 153
Features
Introduction, 12
Feof()
Files, 156
Ferror()
Files, 156
FetchStockData Application
Applications developed in little hours, 2
Fexists()
Files, 158
Fflush()
Files, 154
Fgetc()
Files, 157
Fgetpos()
Files, 156
Fgets()
Files, 157
fibonacci()
Stdlib Functions, 240
Fifteen Puzzle Game
Applications developed in little hours, 3
Fifteen Puzzle Game 2
Applications developed in little hours, 6
File Class
Stdlib Classes, 264
File Hash
Security and Internet Functions, 198
file2list()
Stdlib Functions, 241
Files
Clearerr(), 156
Dir(), 152
Example, 158
Fclose(), 153
Feof(), 156
Ferror(), 156
Fexists(), 158
Fflush(), 154
Fgetc(), 157
Fgetpos(), 156
Fgets(), 157
Fopen(), 153
Fputc(), 157
Fputs(), 157
Fread(), 158
Freopen(), 154
Fseek(), 155
Fsetpos(), 156
Ftell(), 155
Fwrite(), 158
Introduction, 150
Numbers and Bytes, 160
Perror(), 156
Read File using Read(), 152
Remove(), 153
Rename(), 153
Rewind(), 155
Tempfile(), 155
Tempname(), 155
Ungetc(), 157
Write file using Write(), 152
filter()
Stdlib Functions, 237
Filtering using Expressions
Code Generator, 620
Index 861
15. Ring Documentation, Release 1.4.1
Find SubString
Strings, 131
Find() and List of Objects
Object Oriented Programming, 208
First-Class Functions
Functional Programming, 214
First-Class Lists
Lists, 125
Flappy Bird 3000 Game
Game Engine for 2D Games, 407
Fopen()
Files, 153
Fopen() and Fclose() Implementation
Extension, 607
For In Loop
Control Structures - First Style, 100
Control Structures - Second Style, 107
Control Structures - Third Style, 111
for in to modify lists
Control Structures - First Style, 100
For Loop
Control Structures - First Style, 99
Control Structures - Second Style, 106
Control Structures - Third Style, 110
Form Designer
Entering Items, 544
Events Code, 540
Introduction, 537
Keyboard Shortcuts, 543
Menubar Designer, 543
More Samples and Tests, 545
Running Forms, 540
The Designer Windows, 539
The Properties, 539
Using Layouts, 545
What is new in Ring 1.3?, 49
Window Flags, 544
Fputc()
Files, 157
Fputs()
Files, 157
Fread()
Files, 158
Freopen()
Files, 154
Frequently Asked Questions
Can I connect to dbase/harbour database?, 834
Can Ring work on Windows XP?, 836
Conflict between Global Variables and Class At-
tributes, 822
Constructor methods in Ring, 818
Could you explain the output of the StrCmp() func-
tion?, 825
Getter and Setter Methods, 820
Goal of including the Main function in Ring, 817
How can I disable maximize button and resize win-
dow?, 832
How to add Combobox and other elements to the
cells of a QTableWidget?, 839
How to Close a window then displaying another
one?, 831
How to create a Modal Window?, 831
How to create an array of buttons in GUI applica-
tions?, 830
How to extend RingQt and add more classes?, 836
How to get the current source file path?, 823
How to get the file size using ftell() and fseek() func-
tions?, 823
How to insert an item to the first position in the list?,
828
How to perform some manipulations on selected
cells in QTableWidget?, 839
How to print keys or values only in List/Dictionary?,
824
How to print lists that contains objects?, 828
How to print new lines and other characters?, 829
How to use many source code files in the project?,
825
How to use NULL and ISNULL() function?, 827
How to use SQLite using ODBC?, 833
Introduction, 809
Is Ring some sort of improvement over PHP?, 812
List index start from 1, 818
Philosophy behind data types in Ring, 815
Search of global names while defining the class at-
tributes, 821
The documentation says functional programming is
supported, but then this happens?, 814
What about predefined parameters or optional pa-
rameters in functions?, 823
What about the Boolean values in Ring?, 816
What are the advantages to using Ring over C# or
Java?, 814
What are the advantages to using Ring over Lisp or
Smalltalk?, 811
What are the advantages to using Ring over native C
or C++?, 812
What are the advantages to using Ring over Python
and Ruby?, 813
What are the advantages to using Ring over Tcl and
Lua?, 814
What happens when we create a new object?, 819
What is the difference between Ring and Python?
And is Ring Open Source?, 812
Where can I write a program and execute it?, 822
Why do we need Yet Another Programming Lan-
guage (YAPL)?, 810
Why I get a strange result when printing nl with
Index 862
16. Ring Documentation, Release 1.4.1
lists?, 824
Why I get Calling Function without definition Er-
ror?, 835
Why Ring is largely focussed on UI creation?, 812
Why Ring is weakly typed?, 811
Why Ring uses ’See’, ’Give’, ’But’ and ’Ok’ Key-
words?, 815
Why setClickEvent() doesn’t see the object methods
directly?, 835
Why the ability to define your own languages Instead
of just handing over the syntax so you can parse
it using whatever code you like?, 815
Why the window title bar is going outside the
screen?, 829
Why this example use the GetChar() twice?, 826
Why we don’t use () after the qApp class name?, 829
Why you can specify the number of loops you want
to break out of?, 815
Fseek()
Files, 155
Fsetpos()
Files, 156
FSize()
Stdlib Functions, 249
Ftell()
Files, 155
Function Prototype
Extension, 607
function prototype
Code Generator, 616
Function Structure
Extension, 605
Functional Programming
Anonymous and Nested Functions, 215
Equality of functions, 216
First-Class Functions, 214
Higher-order Functions, 214
Introduction, 212
Pure Functions, 213
Functions
Call Functions, 115
Declare parameters, 116
Define Functions, 115
Introduction, 114
Main Function, 116
Recursion, 118
Return Value, 117
Send Parameters, 116
Variables Scope, 117
functions()
Reflection and Meta-programming, 219
Fwrite()
Files, 158
Game Class
Game Engine for 2D Games, 378
Game Engine Classes
Game Engine for 2D Games, 377
Game Engine for 2D Games
Animate Class, 380
Animate Events, 391
Animation, 385
Animation and Functions, 386
Creating the Game Window, 380
Drawing Text, 381
Flappy Bird 3000 Game, 407
Game Class, 378
Game Engine Classes, 377
GameObject Class, 378
Games Layer, 377
Graphics Library Bindings, 376
Interface to graphics library, 376
Introduction, 375
Map, 393
Map Class, 380
Map Events, 394
Moving Text, 382
Object and Drawing, 396
Playing Sound, 384
Project Layers, 376
Sound Class, 380
Sprite Automatic Movement, 387
Sprite Class, 379
Sprite Keypress Event, 388
Sprite Mouse Event, 389
Sprite State Event, 390
Stars Fighter Game, 399
Super Man 2016 Game, 414
Text Class, 379
What is new in Ring 1.1?, 63
GameObject Class
Game Engine for 2D Games, 378
Games Layer
Game Engine for 2D Games, 377
gcd()
Stdlib Functions, 242
Generate Object File
Command Line Options, 590
Generate/Execute Ring Object Files (*.ringo)
What is new in Ring 1.1?, 58
Generating Pages using Objects
Web Development (CGI Library), 321
Get Active Source File Name
System Functions, 165
Get Command Line Arguments
System Functions, 164
Get List Item
Lists, 121
Index 863
17. Ring Documentation, Release 1.4.1
Get List Size
Lists, 121
Get Number of Characters from position
Strings, 131
Get Parameters Values
Extension, 606
Get Request
RingLibCurl, 349
Get Stock Data From Yahoo
RingLibCurl, 351
Get String Length
Strings, 128
Get Substring from position to end
Strings, 131
getattribute()
Reflection and Meta-programming, 231
GetChar()
Getting Input, 113
getnumber()
Stdlib Functions, 235
getstring()
Stdlib Functions, 235
Getter and Setter Methods
Frequently Asked Questions, 820
Getting Input
GetChar(), 113
Getting Started - First Style, 75
Getting Started - Second Style, 77
Getting Started - Third Style, 79
Give Command, 113
Input(), 114
Introduction, 112
Getting Started - First Style
Getting Input, 75
Hello World, 74
Introduction, 73
Multi-Line literals, 74
No Explicit End For Statements, 75
Not Case-Sensitive, 74
Run the program, 74
Writing Comments, 75
Getting Started - Second Style
Getting Input, 77
Hello World, 76
Introduction, 75
Multi-Line literals, 76
No Explicit End For Statements, 77
Not Case-Sensitive, 76
Run the program, 76
Writing Comments, 77
Getting Started - Third Style
Getting Input, 79
Hello World, 78
Introduction, 77
Multi-Line literals, 78
No Explicit End For Statements, 79
Not Case-Sensitive, 78
Run the program, 78
Writing Comments, 79
Give Command
Getting Input, 113
globals()
Reflection and Meta-programming, 218
Goal of including the Main function in Ring
Frequently Asked Questions, 817
Gradient
Web Development (CGI Library), 320
Graphics and Game Programming
Drawing, Animation and Input, 356
Introduction, 355
Playing Sound, 363
Scaling and Rotating Images, 364
Threads, 366
Transparent Image, 365
TrueType Fonts, 362
Graphics Library Bindings
Game Engine for 2D Games, 376
Hash Functions
Web Development (CGI Library), 315
HashTable Class
Stdlib Classes, 257
Hello World
Getting Started - First Style, 74
Getting Started - Second Style, 76
Getting Started - Third Style, 78
Hello World Program using the Web Library
Web Development (CGI Library), 298
Hex()
Data Type, 144
Hex2str()
Data Type, 145
Higher-order Functions
Functional Programming, 214
History
Introduction, 12
Natural Language Programming, 280
How can I disable maximize button and resize window?
Frequently Asked Questions, 832
How Ring find a functions and methods?
Scope Rules for Functions and Methods, 561
How Ring find the Variable?
Scope Rules, 547
How to add Combobox and other elements to the cells of
a QTableWidget?
Frequently Asked Questions, 839
How to Close a window then displaying another one?
Frequently Asked Questions, 831
Index 864
18. Ring Documentation, Release 1.4.1
How to contribute?
Applications, 73
Compiler and Virtual Machine (VM), 73
Documentation, 72
Editors Support, 73
Extensions in C/C++, 73
Ideas and suggestions, 73
Introduction, 71
Libraries in Ring, 73
Samples, 72
Special thanks to contributors, 72
Testing, 72
How to create a Modal Window?
Frequently Asked Questions, 831
How to create an array of buttons in GUI applications?
Frequently Asked Questions, 830
How to extend RingQt and add more classes?
Frequently Asked Questions, 836
How to get the current source file path?
Frequently Asked Questions, 823
How to get the file size using ftell() and fseek() functions?
Frequently Asked Questions, 823
How to insert an item to the first position in the list?
Frequently Asked Questions, 828
How to perform some manipulations on selected cells in
QTableWidget?
Frequently Asked Questions, 839
How to print keys or values only in List/Dictionary?
Frequently Asked Questions, 824
How to print lists that contains objects?
Frequently Asked Questions, 828
How to print new lines and other characters?
Frequently Asked Questions, 829
How to use many source code files in the project?
Frequently Asked Questions, 825
How to use NULL and ISNULL() function?
Frequently Asked Questions, 827
How to use SQLite using ODBC?
Frequently Asked Questions, 833
HTML Lists
Web Development (CGI Library), 318
HTML Special Characters
Web Development (CGI Library), 314
HTML Tables
Web Development (CGI Library), 319
HTTP Get Example
Web Development (CGI Library), 299
HTTP POST Example
Web Development (CGI Library), 304
Ideas and suggestions
How to contribute?, 73
If Statement
Control Structures - Second Style, 105
Control Structures - Third Style, 108
Inheritance
Object Oriented Programming, 206
Inheritance from GUI Classes
Desktop and Mobile Development, 490
Input()
Getting Input, 114
Insert()
Lists, 124
Install Qt for Android
Building RingQt Applications for Mobile, 530
Interface to graphics library
Game Engine for 2D Games, 376
Internet Class
Stdlib Classes, 273
Introduction
Features, 12
History, 12
Introduction, 10
Motivation, 11
Is Ring some sort of improvement over PHP?
Frequently Asked Questions, 812
IsAlNum()
Data Type, 140
IsAlpha()
Data Type, 140
IsAndroid() Function
System Functions, 163
isattribute()
Reflection and Meta-programming, 227
iscfunction()
Reflection and Meta-programming, 221
isclass()
Reflection and Meta-programming, 223
IsCntrl()
Data Type, 140
IsDigit()
Data Type, 141
IsFreeBSD() Function
System Functions, 163
isfunction()
Reflection and Meta-programming, 221
isglobal()
Reflection and Meta-programming, 220
IsGraph()
Data Type, 141
isleapyear()
Stdlib Functions, 244
IsLinux() Function
System Functions, 163
IsList()
Data Type, 139
islocal()
Reflection and Meta-programming, 220
Index 865
19. Ring Documentation, Release 1.4.1
IsLower()
Data Type, 141
IsMacOSX() Function
System Functions, 162
ismainsourcefile()
Stdlib Functions, 248
ismethod()
Reflection and Meta-programming, 228
IsMSDOS() Function
System Functions, 162
IsNULL()
Data Type, 139
IsNumber()
Data Type, 138
isobject()
Reflection and Meta-programming, 226
ispackage()
Reflection and Meta-programming, 222
ispackagesclass()
Reflection and Meta-programming, 225
isprime()
Stdlib Functions, 240
IsPrint()
Data Type, 141
isprivateattribute()
Reflection and Meta-programming, 227
isprivatemethod()
Reflection and Meta-programming, 228
IsPunct()
Data Type, 142
IsSpace()
Data Type, 142
isspecial()
Stdlib Functions, 239
IsString()
Data Type, 138
IsUnix() Function
System Functions, 162
IsUpper()
Data Type, 142
isvowel()
Stdlib Functions, 239
IsWindows() Function
System Functions, 162
IsWindows64() Function
System Functions, 162
IsXdigit()
Data Type, 142
JustFileName()
Stdlib Functions, 236
JustFilePath()
Stdlib Functions, 236
Keyboard Shortcuts
Form Designer, 543
KeyPress and Mouse Move Events
Desktop and Mobile Development, 484
Language Design
Compact Syntax, 20
Define Declarative Languages, 23
Define Natural Statements, 21
Designed for a clear goal, 16
Encourage Organization, 18
Introduction, 15
Simple, 16
Smart Garbage Collector, 24
Transparent Implementation, 18
Trying to be natural, 17
Visual Implementation, 19
Why Ring?, 16
Language Functions
Reference, 842
Language Grammar
Reference, 845
Language Keywords
Reference, 841
Language Shell
Demo Programs, 170
lcm()
Stdlib Functions, 243
Left()
Strings, 129
Libraries in Ring
How to contribute?, 73
Library Usage
Objects Library for RingQt Application, 533
linecount()
Stdlib Functions, 240
Lines()
Strings, 130
List Class
Stdlib Classes, 254
List index start from 1
Frequently Asked Questions, 818
List of changes and new features
What is new in Ring 1.1?, 57
What is new in Ring 1.2?, 51
What is new in Ring 1.3?, 38
What is new in Ring 1.4.1?, 25
What is new in Ring 1.4?, 29
list of functions
Mathematical Functions, 146
list2file()
Stdlib Functions, 241
Lists
Access List Items by String Index, 126
Add Items, 120
Index 866
20. Ring Documentation, Release 1.4.1
Copy Lists, 124
Create Lists, 120
Delete Item From List, 121
First-Class Lists, 125
Get List Item, 121
Get List Size, 121
Insert(), 124
Introduction, 119
Nested Lists, 124
Passing Lists to Functions, 125
Passing Parameters Using List, 126
Reverse(), 123
Search, 122
Set List Item, 121
Sort(), 122
Swap Items, 127
Using Lists during definition, 125
Load Syntax Files
Syntax Flexibility, 566
locals()
Reflection and Meta-programming, 218
Logical Operators
Operators, 95
Loop Command
Control Structures - First Style, 102
Looping
Control Structures, 109
Control Structures - First Style, 99
Control Structures - Second Style, 106
Low Level Functions
callgc(), 591
Introduction, 590
nullpointer(), 593
object2pointer(), 593
pointer2object(), 593
ptrcmp(), 594
RingVM_CallList(), 599
RingVM_CFunctionsList(), 594
RingVM_ClassesList(), 595
RingVM_FilesList(), 600
RingVM_FunctionsList(), 595
RingVM_MemoryList(), 597
RingVM_PackagesList(), 596
space(), 592
varptr(), 592
Main Function
Functions, 116
Main Menu
Demo Programs, 170
makedir()
Stdlib Functions, 248
Map
Game Engine for 2D Games, 393
Map Class
Game Engine for 2D Games, 380
Map Events
Game Engine for 2D Games, 394
map()
Stdlib Functions, 237
Math Class
Stdlib Classes, 259
Mathematical Functions
Decimals(), 149
Example, 146
Introduction, 145
list of functions, 146
Random(), 148
Unsigned(), 149
matrixmulti()
Stdlib Functions, 245
matrixtrans()
Stdlib Functions, 245
MD5()
Security and Internet Functions, 195
Menubar and StyleSheet Example
Desktop and Mobile Development, 464
Menubar Designer
Form Designer, 543
mergemethods()
Reflection and Meta-programming, 233
Methods to use Events with Events Filter
Desktop and Mobile Development, 527
methods()
Reflection and Meta-programming, 226
Misc Operators
Operators, 96
Module Organization
Extension, 604
More Beatiful Code
Declarative Programming, 278
More Samples and Tests
Form Designer, 545
Motivation
Introduction, 11
Mouse Events
RingLibSDL, 373
Movable Label Example
Desktop and Mobile Development, 480
Moving Objects using the Mouse
Desktop and Mobile Development, 486
Moving Text
Game Engine for 2D Games, 382
Multi-Line literals
Getting Started - First Style, 74
Getting Started - Second Style, 76
Getting Started - Third Style, 78
MySQL Class
Index 867
21. Ring Documentation, Release 1.4.1
Stdlib Classes, 270
MySQL Functions
Create Database, 184
Create Table and Insert Data, 185
Introduction, 182
MySQL_AutoCommit(), 190
MySQL_Close(), 184
MySQL_Columns(), 187
MySQL_Commit(), 190
MySQL_Connect(), 184
MySQL_Error(), 184
MySQL_Escape_String(), 189
MySQL_Info(), 183
MySQL_Init(), 184
MySQL_Inser_ID(), 186
MySQL_Next_Result(), 187
MySQL_Query(), 184
MySQL_Result(), 187
MySQL_Result2(), 188
MySQL_Rollback(), 190
Print Query Result, 187
Restore Image From The Database, 189
Save Image Inside the Database, 189
Transaction Example, 190
MySQL_AutoCommit()
MySQL Functions, 190
MySQL_Close()
MySQL Functions, 184
MySQL_Columns()
MySQL Functions, 187
MySQL_Columns() Implementation
Extension, 610
MySQL_Commit()
MySQL Functions, 190
MySQL_Connect()
MySQL Functions, 184
MySQL_Error()
MySQL Functions, 184
MySQL_Escape_String()
MySQL Functions, 189
MySQL_Info()
MySQL Functions, 183
MySQL_Init()
MySQL Functions, 184
MySQL_Inser_ID()
MySQL Functions, 186
MySQL_Next_Result()
MySQL Functions, 187
MySQL_Query()
MySQL Functions, 184
MySQL_Result()
MySQL Functions, 187
MySQL_Result2()
MySQL Functions, 188
MySQL_Rollback()
MySQL Functions, 190
Natural Language Programming
BraceError() Method, 287
BraceExprEval Method, 286
BraceStart and BraceEnd Methods, 285
Change the ’=’ operator to ’is’, 283
Change the Ring Keyword ’And’, 281
Change the Ring Operator ’+’, 282
Clean Natural Code, 288
Example, 280
History, 280
Introduction, 279
Real Natual Code, 286
Using Eval() with our Natural Code, 284
Natural Library - Demo Program
Using the Natural Library, 290
Nested Lists
Lists, 124
New Classes names - Index Start from 1
Desktop and Mobile Development, 529
New Functions
What is new in Ring 1.2?, 51
What is new in Ring 1.3?, 47
New Functions and Changes
What is new in Ring 1.1?, 60
New Sample : Sixteen Puzzle
What is new in Ring 1.4.1?, 27
New Style to Ring Notepad
What is new in Ring 1.4.1?, 26
What is new in Ring 1.4?, 32
newlist()
Stdlib Functions, 238
No Explicit End For Statements
Getting Started - First Style, 75
Getting Started - Second Style, 77
Getting Started - Third Style, 79
No Run
Command Line Options, 589
Not Case-Sensitive
Getting Started - First Style, 74
Getting Started - Second Style, 76
Getting Started - Third Style, 78
Notepad Application
Desktop and Mobile Development, 503
nullpointer()
Low Level Functions, 593
Number()
Data Type, 143
Numbers and Bytes
Files, 160
Object and Drawing
Index 868
22. Ring Documentation, Release 1.4.1
Game Engine for 2D Games, 396
Object Library Source Code
Objects Library for RingQt Application, 537
Object Oriented Programming
Access Objects Using Braces, 202
Classes and Objects, 200
Composition, 203
Dynamic Attributes, 207
Find() and List of Objects, 208
Inheritance, 206
Introduction, 199
Operator Overloading, 205
Packages, 207
Printing Objects, 208
Private Attributes and Methods, 204
Setter and Getter, 204
Sort() and List of Objects, 209
Using Self.Attribute, 211
object2pointer()
Low Level Functions, 593
objectid()
Reflection and Meta-programming, 225
Objects inside lists
Declarative Programming, 274
Objects Library for RingQt
What is new in Ring 1.2?, 53
Objects Library for RingQt Application
Example, 533
Introduction, 532
Library Usage, 533
Object Library Source Code, 537
Open_WindowAndLink() Function, 537
ODBC Class
Stdlib Classes, 269
ODBC Functions
Execute Query and Print Result, 178
Introduction, 173
odbc_autocommit(), 180
odbc_close(), 175
odbc_colcount(), 177
odbc_columns(), 179
odbc_commit(), 180
odbc_connect(), 176
odbc_datasources(), 175
odbc_disconnect(), 177
odbc_drivers(), 174
odbc_execute(), 177
odbc_fetch(), 178
odbc_getdata(), 178
odbc_init(), 174
odbc_rollback(), 180
odbc_tables(), 178
Open and Close Connection, 177
Print List of ODBC Data Sources, 176
Print List of ODBC Drivers, 175
Save and Restore Images, 181
Transactions and Using Commit and Rollback, 180
odbc_autocommit()
ODBC Functions, 180
odbc_close()
ODBC Functions, 175
odbc_colcount()
ODBC Functions, 177
odbc_columns()
ODBC Functions, 179
odbc_commit()
ODBC Functions, 180
odbc_connect()
ODBC Functions, 176
odbc_datasources()
ODBC Functions, 175
odbc_disconnect()
ODBC Functions, 177
odbc_drivers()
ODBC Functions, 174
odbc_execute()
ODBC Functions, 177
odbc_fetch()
ODBC Functions, 178
odbc_getdata()
ODBC Functions, 178
odbc_init()
ODBC Functions, 174
odbc_rollback()
ODBC Functions, 180
odbc_tables()
ODBC Functions, 178
Open and Close Connection
ODBC Functions, 177
Open_WindowAndLink() Function
Objects Library for RingQt Application, 537
Operator Overloading
Object Oriented Programming, 205
Operators
Arithmetic Operators, 95
Assignment Operators, 96
Bitwise Operators, 95
Introduction, 94
Logical Operators, 95
Misc Operators, 96
Operators Precedence, 96
Relational Operators, 95
Using the Natural Library, 294
Operators Precedence
Operators, 96
Other Widgets Events
Desktop and Mobile Development, 468
Index 869
23. Ring Documentation, Release 1.4.1
packagename()
Reflection and Meta-programming, 234
Packages
Object Oriented Programming, 207
packages()
Reflection and Meta-programming, 222
packagesclasses()
Reflection and Meta-programming, 224
Page Class
Web Development (CGI Library), 345
palindrome()
Stdlib Functions, 244
Passing Lists to Functions
Lists, 125
Passing Parameters Using List
Lists, 126
Performance
Command Line Options, 589
permutation()
Stdlib Functions, 246
Perror()
Files, 156
Philosophy behind data types in Ring
Frequently Asked Questions, 815
Play Sound
RingLibSDL, 374
Playing Sound
Desktop and Mobile Development, 478
Game Engine for 2D Games, 384
Graphics and Game Programming, 363
pointer2object()
Low Level Functions, 593
Post Request
RingLibCurl, 349
Prefix for Functions Names
Code Generator, 618
PrevFileName() Function
System Functions, 165
Print files in Zip file
RingZip, 353
Print List of ODBC Data Sources
ODBC Functions, 176
Print List of ODBC Drivers
ODBC Functions, 175
Print Query Result
MySQL Functions, 187
print()
Stdlib Functions, 235
Printing Final Intermediate Code
Command Line Options, 584
Printing Instruction Operation Code
Command Line Options, 589
Printing Intermediate Code
Command Line Options, 582
Printing Objects
Object Oriented Programming, 208
Printing Rules
Command Line Options, 578
Printing Tokens
Command Line Options, 576
Printing using QPrinter
Desktop and Mobile Development, 476
Private Attributes and Methods
Object Oriented Programming, 204
prodlist()
Stdlib Functions, 243
Program Structure
Introduction, 118
Source Code File Sections, 119
Using Many Source Code Files, 119
Project Folder
Building Games For Android, 426
Project Layers
Game Engine for 2D Games, 376
Protecting the Source Code
Distributing Ring Application, 574
ptrcmp()
Low Level Functions, 594
Pure Functions
Functional Programming, 213
puts()
Stdlib Functions, 235
QAbstractButton Class
RingQt Classes Reference, 720
QAbstractItemView Class
RingQt Classes Reference, 706
QAbstractScrollArea Class
RingQt Classes Reference, 706
QAbstractSlider Class
RingQt Classes Reference, 713
QAbstractSocket Class
RingQt Classes Reference, 741
QAbstractSpinBox Class
RingQt Classes Reference, 716
QAction Class
RingQt Classes Reference, 724
QAllEvents Class
RingQt Classes Reference, 755
QApp Class
RingQt Classes Reference, 673
QAxBase Class
RingQt Classes Reference, 806
QAxObject Class
RingQt Classes Reference, 806
QBitmap Class
RingQt Classes Reference, 681
QBoxLayout Class
Index 870
24. Ring Documentation, Release 1.4.1
RingQt Classes Reference, 796
QBrush Class
RingQt Classes Reference, 738
QButtonGroup Class
RingQt Classes Reference, 722
QByteArray Class
RingQt Classes Reference, 739
QCamera Class
RingQt Classes Reference, 791
QCameraImageCapture Class
RingQt Classes Reference, 792
QCameraViewfinder Class
RingQt Classes Reference, 790
QCheckBox Class
RingQt Classes Reference, 720
QColor Class
RingQt Classes Reference, 733
QColorDialog Class
RingQt Classes Reference, 751
QComboBox Class
RingQt Classes Reference, 696
QCompleter Class
RingQt Classes Reference, 801
QCompleter2 Class
RingQt Classes Reference, 802
QCompleter3 Class
RingQt Classes Reference, 802
QCursor Class
RingQt Classes Reference, 805
QDate Class
RingQt Classes Reference, 764
QDateEdit Class
RingQt Classes Reference, 715
QDateTimeEdit Class
RingQt Classes Reference, 715
QDesktopServices Class
RingQt Classes Reference, 673
QDesktopWidget Class
RingQt Classes Reference, 757
QDial Class
RingQt Classes Reference, 717
QDialog Class
RingQt Classes Reference, 749
QDir Class
RingQt Classes Reference, 691
QDirModel Class
RingQt Classes Reference, 747
QDockWidget Class
RingQt Classes Reference, 702
QEvent Class
RingQt Classes Reference, 726
QFileDialog Class
RingQt Classes Reference, 728
QFileInfo Class
RingQt Classes Reference, 746
QFileSystemModel Class
RingQt Classes Reference, 691
QFont Class
RingQt Classes Reference, 736
QFontDialog Class
RingQt Classes Reference, 748
QFontMetrics Class
RingQt Classes Reference, 795
QFrame Class
RingQt Classes Reference, 705
QFrame2 Class
RingQt Classes Reference, 705
QFrame3 Class
RingQt Classes Reference, 706
QGradient Class
RingQt Classes Reference, 798
QGraphicsVideoItem Class
RingQt Classes Reference, 791
QGridLayout Class
RingQt Classes Reference, 788
QHBoxLayout Class
RingQt Classes Reference, 684
QHeaderView Class
RingQt Classes Reference, 793
QHostAddress Class
RingQt Classes Reference, 745
QHostInfo Class
RingQt Classes Reference, 745
QIcon Class
RingQt Classes Reference, 682
QImage Class
RingQt Classes Reference, 774
QInputDialog Class
RingQt Classes Reference, 753
QIODevice Class
RingQt Classes Reference, 741
QJsonArray Class
RingQt Classes Reference, 783
QJsonDocument Class
RingQt Classes Reference, 783
QJsonObject Class
RingQt Classes Reference, 784
QJsonParseError Class
RingQt Classes Reference, 785
QJsonValue Class
RingQt Classes Reference, 785
QKeySequence Class
RingQt Classes Reference, 752
QLabel Class
RingQt Classes Reference, 680
QLayout Class
RingQt Classes Reference, 797
QLCDNumber Class
Index 871
25. Ring Documentation, Release 1.4.1
RingQt Classes Reference, 753
QLinearGradient Class
RingQt Classes Reference, 798
QLineEdit Class
RingQt Classes Reference, 682
QLineEdit Events and QMessageBox
Desktop and Mobile Development, 466
QListView Class
RingQt Classes Reference, 805
QListWidget Class
RingQt Classes Reference, 687
QListWidgetItem Class
RingQt Classes Reference, 762
QMainWindow Class
RingQt Classes Reference, 700
QMdiArea Class
RingQt Classes Reference, 803
QMdiSubWindow Class
RingQt Classes Reference, 804
QMediaObject Class
RingQt Classes Reference, 793
QMediaPlayer Class
RingQt Classes Reference, 722
QMediaPlaylist Class
RingQt Classes Reference, 723
QMenu Class
RingQt Classes Reference, 698
QMenuBar Class
RingQt Classes Reference, 698
QMessageBox Class
RingQt Classes Reference, 726
QMessagebox Example
Desktop and Mobile Development, 481
QNetworkAccessManager Class
RingQt Classes Reference, 771
QNetworkProxy Class
RingQt Classes Reference, 743
QNetworkReply Class
RingQt Classes Reference, 772
QNetworkRequest Class
RingQt Classes Reference, 771
QObject Class
RingQt Classes Reference, 673
QPainter Class
RingQt Classes Reference, 729
QPainter2 Class
RingQt Classes Reference, 731
QPainterPath Class
RingQt Classes Reference, 773
QPen Class
RingQt Classes Reference, 732
QPicture Class
RingQt Classes Reference, 732
QPixmap Class
RingQt Classes Reference, 681
QPixmap2 Class
RingQt Classes Reference, 682
QPlainTextEdit Class
RingQt Classes Reference, 785
QPoint Class
RingQt Classes Reference, 799
QPointF Class
RingQt Classes Reference, 799
QPrinter Class
RingQt Classes Reference, 735
QProcess Class
RingQt Classes Reference, 802
QProgressBar Class
RingQt Classes Reference, 712
QPushButton Class
RingQt Classes Reference, 681
QRadioButton Class
RingQt Classes Reference, 721
QRect Class
RingQt Classes Reference, 757
QRegularExpression Class
RingQt Classes Reference, 781
QRegularExpressionMatch Class
RingQt Classes Reference, 782
QRegularExpressionMatchIterator Class
RingQt Classes Reference, 782
QScrollArea Class
RingQt Classes Reference, 799
QSerialPort Class
RingQt Classes Reference, 808
QSerialPortInfo Class
RingQt Classes Reference, 809
QSize Class
RingQt Classes Reference, 682
QSlider Class
RingQt Classes Reference, 714
QSpinBox Class
RingQt Classes Reference, 712
QSplashScreen Class
RingQt Classes Reference, 796
QSplitter Class
RingQt Classes Reference, 800
QSqlDatabase Class
RingQt Classes Reference, 765
QSqlDriver Class
RingQt Classes Reference, 766
QSqlDriverCreatorBase Class
RingQt Classes Reference, 769
QSqlError Class
RingQt Classes Reference, 767
QSqlField Class
RingQt Classes Reference, 768
QSqlIndex Class
Index 872
26. Ring Documentation, Release 1.4.1
RingQt Classes Reference, 767
QSqlQuery Class
RingQt Classes Reference, 766
QSqlRecord Class
RingQt Classes Reference, 768
QStatusBar Class
RingQt Classes Reference, 701
QString2 Class
RingQt Classes Reference, 802
QStringList Class
RingQt Classes Reference, 751
QSystemTrayIcon Class
RingQt Classes Reference, 763
Qt Class Convertor
What is new in Ring 1.4?, 36
Qt configuration file
Code Generator, 624
QTableView Class
RingQt Classes Reference, 708
QTableWidget Class
RingQt Classes Reference, 709
QTableWidgetItem Class
RingQt Classes Reference, 704
QTabWidget Class
RingQt Classes Reference, 702
QTcpServer Class
RingQt Classes Reference, 744
QTcpSocket Class
RingQt Classes Reference, 744
QTest Class
RingQt Classes Reference, 673
QTextBlock Class
RingQt Classes Reference, 761
QTextCharFormat Class
RingQt Classes Reference, 789
QTextCodec Class
RingQt Classes Reference, 764
QTextCursor Class
RingQt Classes Reference, 749
QTextDocument Class
RingQt Classes Reference, 759
QTextEdit Class
RingQt Classes Reference, 685
QThread Class
RingQt Classes Reference, 780
QThreadPool Class
RingQt Classes Reference, 781
QTime Class
RingQt Classes Reference, 761
QTimer Class
RingQt Classes Reference, 727
QToolBar Class
RingQt Classes Reference, 699
QToolButton Class
RingQt Classes Reference, 807
QTreeView Class
RingQt Classes Reference, 689
QTreeWidget Class
RingQt Classes Reference, 692
QTreeWidgetItem Class
RingQt Classes Reference, 694
Queue Class
Stdlib Classes, 256
Quotes about Ring
Applications developed in little hours, 1
QUrl Class
RingQt Classes Reference, 719
QUuid Class
RingQt Classes Reference, 807
QVariant Class
RingQt Classes Reference, 769
QVBoxLayout Class
RingQt Classes Reference, 684
QVideoWidget and QMediaPlayer
Desktop and Mobile Development, 460
QVideoWidget Class
RingQt Classes Reference, 723
QVideoWidgetControl Class
RingQt Classes Reference, 791
QWebView Class
RingQt Classes Reference, 718
QWidget Class
RingQt Classes Reference, 674
QXmlStreamAttribute Class
RingQt Classes Reference, 780
QXmlStreamAttributes Class
RingQt Classes Reference, 779
QXmlStreamEntityDeclaration Class
RingQt Classes Reference, 779
QXmlStreamEntityResolver Class
RingQt Classes Reference, 779
QXmlStreamNamespaceDeclaration Class
RingQt Classes Reference, 779
QXmlStreamNotationDeclaration Class
RingQt Classes Reference, 778
QXmlStreamReader Class
RingQt Classes Reference, 776
QXmlStreamWriter Class
RingQt Classes Reference, 777
Raise()
Eval() and Debugging, 168
RandBytes()
Security and Internet Functions, 198
Random Image
Web Development (CGI Library), 317
Random()
Mathematical Functions, 148
Index 873
27. Ring Documentation, Release 1.4.1
Read File using Read()
Files, 152
readline()
Stdlib Functions, 246
Real Natual Code
Natural Language Programming, 286
Recursion
Functions, 118
Reference
Compiler Errors, 843
Introduction, 840
Language Functions, 842
Language Grammar, 845
Language Keywords, 841
Runtime Errors, 844
Virtual Machine Instructions, 847
Reflection and Meta-programming
addattribute(), 229
addmethod(), 229
attributes(), 226
cfunctions(), 219
classes(), 223
classname(), 225
functions(), 219
getattribute(), 231
globals(), 218
Introduction, 217
isattribute(), 227
iscfunction(), 221
isclass(), 223
isfunction(), 221
isglobal(), 220
islocal(), 220
ismethod(), 228
isobject(), 226
ispackage(), 222
ispackagesclass(), 225
isprivateattribute(), 227
isprivatemethod(), 228
locals(), 218
mergemethods(), 233
methods(), 226
objectid(), 225
packagename(), 234
packages(), 222
packagesclasses(), 224
setattribute(), 232
Register New Functions
Code Generator, 619
Regular Expressions
Desktop and Mobile Development, 495
Relational Operators
Operators, 95
Remove()
Files, 153
Rename()
Files, 153
Resources
Contact the Autor, 854
Introduction, 853
Ring Group, 854
Ring Language Website, 854
Restore Image From The Database
MySQL Functions, 189
Return object by reference
Declarative Programming, 275
Return Self by Reference
What is new in Ring 1.3?, 47
Return Value
Extension, 606
Functions, 117
Reverse()
Lists, 123
Rewind()
Files, 155
Right()
Strings, 129
RING API - list Functions
Extension, 608
RING API - String Functions
Extension, 610
Ring CGI Hello World Program
Web Development (CGI Library), 298
Ring Group
Resources, 854
Ring Language Website
Resources, 854
Ring mode for Emacs Editor
What is new in Ring 1.3?, 45
Ring Notepad
Introduction, 79
Ring Notepad - Creating and running your first con-
sole application, 80
Ring Notepad - Creating and running your first game,
85
Ring Notepad - Creating and running your first GUI
application, 83
Ring Notepad - Creating and running your first Web
application, 84
Ring Notepad - Main Window, 80
Ring Notepad - Creating and running your first console
application
Ring Notepad, 80
Ring Notepad - Creating and running your first game
Ring Notepad, 85
Ring Notepad - Creating and running your first GUI ap-
plication
Ring Notepad, 83
Index 874
28. Ring Documentation, Release 1.4.1
Ring Notepad - Creating and running your first Web ap-
plication
Ring Notepad, 84
Ring Notepad - Main Window
Ring Notepad, 80
Ring State
Embedding Ring Language in C/C++ Programs, 613
Ring State Functions
Embedding Ring Language in C/C++ Programs, 613
Ring State Variables
Embedding Ring Language in C/C++ Programs, 614
ring_ext.c
Extension, 603
ring_ext.h
Extension, 603
RingAllegro Functions Reference
Introduction, 637
RingCodeHighlighter Class
RingQt Classes Reference, 775
RingLibCurl
Facebook Login, 349
Get Request, 349
Get Stock Data From Yahoo, 351
Introduction, 348
Post Request, 349
Save output to string, 350
What is new in Ring 1.2?, 54
RingLibCurl Functions Reference
Introduction, 634
RingLibSDL
Close Window Event, 372
Create Window, 369
Display Image, 369
Display PNG Images, 370
Display Transparent Images, 371
Draw Rectangle, 370
Introduction, 368
Mouse Events, 373
Play Sound, 374
Switch Between Two Images, 369
Use TTF Fonts, 371
What is new in Ring 1.1?, 63
RingLibSDL Functions Reference
Introduction, 656
RingLibZip Functions Reference
Introduction, 636
RingQt Classes and their Qt Documentation
Desktop and Mobile Development, 529
RingQt Classes Reference
CodeEditor Class, 788
Introduction, 672
QAbstractButton Class, 720
QAbstractItemView Class, 706
QAbstractScrollArea Class, 706
QAbstractSlider Class, 713
QAbstractSocket Class, 741
QAbstractSpinBox Class, 716
QAction Class, 724
QAllEvents Class, 755
QApp Class, 673
QAxBase Class, 806
QAxObject Class, 806
QBitmap Class, 681
QBoxLayout Class, 796
QBrush Class, 738
QButtonGroup Class, 722
QByteArray Class, 739
QCamera Class, 791
QCameraImageCapture Class, 792
QCameraViewfinder Class, 790
QCheckBox Class, 720
QColor Class, 733
QColorDialog Class, 751
QComboBox Class, 696
QCompleter Class, 801
QCompleter2 Class, 802
QCompleter3 Class, 802
QCursor Class, 805
QDate Class, 764
QDateEdit Class, 715
QDateTimeEdit Class, 715
QDesktopServices Class, 673
QDesktopWidget Class, 757
QDial Class, 717
QDialog Class, 749
QDir Class, 691
QDirModel Class, 747
QDockWidget Class, 702
QEvent Class, 726
QFileDialog Class, 728
QFileInfo Class, 746
QFileSystemModel Class, 691
QFont Class, 736
QFontDialog Class, 748
QFontMetrics Class, 795
QFrame Class, 705
QFrame2 Class, 705
QFrame3 Class, 706
QGradient Class, 798
QGraphicsVideoItem Class, 791
QGridLayout Class, 788
QHBoxLayout Class, 684
QHeaderView Class, 793
QHostAddress Class, 745
QHostInfo Class, 745
QIcon Class, 682
QImage Class, 774
QInputDialog Class, 753
Index 875
30. Ring Documentation, Release 1.4.1
What is new in Ring 1.4?, 32
RingSQLite
What is new in Ring 1.1?, 64
RingVM_CallList()
Low Level Functions, 599
RingVM_CFunctionsList()
Low Level Functions, 594
RingVM_ClassesList()
Low Level Functions, 595
RingVM_FilesList()
Low Level Functions, 600
RingVM_FunctionsList()
Low Level Functions, 595
RingVM_MemoryList()
Low Level Functions, 597
RingVM_PackagesList()
Low Level Functions, 596
RingZip
Create Zip File, 353
Extract Zip File, 353
Introduction, 352
Print files in Zip file, 353
Using RingZip Classes, 353
Zip Class Reference, 355
ZipEntry Class Reference, 355
RingZip Library
What is new in Ring 1.3?, 48
Rotate Text
Desktop and Mobile Development, 492
Run the program
Getting Started - First Style, 74
Getting Started - Second Style, 76
Getting Started - Third Style, 78
Running Forms
Form Designer, 540
Runtime Errors
Reference, 844
Samples
How to contribute?, 72
Samples in this book
Applications developed in little hours, 7
Save and Restore Images
ODBC Functions, 181
Save Image Inside the Database
MySQL Functions, 189
Save output to string
RingLibCurl, 350
Scaling and Rotating Images
Graphics and Game Programming, 364
Scope Rules
Accessing the class attributes from braces inside
class methods, 552
Conflict between Class Attributes and Local Vari-
ables, 549
Conflict between Global Variables and Class At-
tributes, 548
Conflict between self inside braces and self in the
class region, 555
Creating a Class for each Window in GUI applica-
tions, 554
Defining Variables and Variables Access, 546
How Ring find the Variable?, 547
Introduction, 545
Summary of Scope Rules, 559
The Self Object, 547
Three Scopes, 546
Using Braces to access objects inside Class Methods,
550
Using braces to escape from the current object scope,
558
Using Object.Attribute, 547
Scope Rules for Functions and Methods
Calling a function sharing the name with a method in
the current class, 563
Example about Sharing Names between Functions
and Methods, 561
How Ring find a functions and methods?, 561
Introduction, 560
ScriptFunctions Class
Web Development (CGI Library), 347
Search
Lists, 122
Search of global names while defining the class attributes
Frequently Asked Questions, 821
Security and Internet Functions
Decrypt(), 198
Download(), 199
Encrypt(), 197
Example, 198
File Hash, 198
Introduction, 194
MD5(), 195
RandBytes(), 198
SendEmail(), 199
SHA1(), 196
SHA224(), 197
SHA256(), 196
SHA384(), 197
SHA512(), 196
Security Class
Stdlib Classes, 272
Send Parameters
Functions, 116
SendEmail()
Security and Internet Functions, 199
Serial Execution of Programs
Index 877