The Ring programming language version 1.4.1 book - Part 31 of 31
1. Ring Documentation, Release 1.4.1
Embedding Ring in Ring, 601
Set List Item
Lists, 121
setattribute()
Reflection and Meta-programming, 232
Setter and Getter
Object Oriented Programming, 204
SHA1()
Security and Internet Functions, 196
SHA224()
Security and Internet Functions, 197
SHA256()
Security and Internet Functions, 196
SHA384()
Security and Internet Functions, 197
SHA512()
Security and Internet Functions, 196
Shared Libraries
Extension, 611
Short-circuit evaluation
Control Structures - First Style, 102
sign()
Stdlib Functions, 241
Simple
Language Design, 16
Simple Client and Server Example
Desktop and Mobile Development, 496
Sin() Implementation
Extension, 607
Single: Desktop and Mobile Development
Introduction, 428
sleep()
Stdlib Functions, 247
Smart Garbage Collector
Language Design, 24
Sort()
Lists, 122
Sort() and List of Objects
Object Oriented Programming, 209
Sound Class
Game Engine for 2D Games, 380
Source Code File Sections
Program Structure, 119
space()
Low Level Functions, 592
Special thanks to contributors
How to contribute?, 72
split()
Stdlib Functions, 238
splitmany()
Stdlib Functions, 238
Sprite Automatic Movement
Game Engine for 2D Games, 387
Sprite Class
Game Engine for 2D Games, 379
Sprite Keypress Event
Game Engine for 2D Games, 388
Sprite Mouse Event
Game Engine for 2D Games, 389
Sprite State Event
Game Engine for 2D Games, 390
SQLite
Introduction, 191
sqlite_close(), 192
sqlite_execute(), 192
sqlite_init(), 192
sqlite_open(), 192
SQLite Class
Stdlib Classes, 271
sqlite_close()
SQLite, 192
sqlite_execute()
SQLite, 192
sqlite_init()
SQLite, 192
sqlite_open()
SQLite, 192
Squares Puzzle Game
Applications developed in little hours, 4
Stack Class
Stdlib Classes, 256
Stars Fighter Game
Game Engine for 2D Games, 399
startswith()
Stdlib Functions, 242
StdBase Class
Stdlib Classes, 251
Stdlib Classes
Conversion Class, 268
DataType Class, 267
DateTime Class, 262
Debug Class, 266
File Class, 264
HashTable Class, 257
Internet Class, 273
Introduction, 250
List Class, 254
Math Class, 259
MySQL Class, 270
ODBC Class, 269
Queue Class, 256
Security Class, 272
SQLite Class, 271
Stack Class, 256
StdBase Class, 251
String Class, 252
System Class, 265
Tree Class, 258
Index 878
2. Ring Documentation, Release 1.4.1
Stdlib Functions
apppath(), 236
binarydigits(), 245
capitalized(), 239
changestring(), 247
dayofweek(), 246
direxists(), 248
endswith(), 242
EpochTime(), 249
evenorodd(), 243
factorial(), 240
factors(), 244
fibonacci(), 240
file2list(), 241
filter(), 237
FSize(), 249
gcd(), 242
getnumber(), 235
getstring(), 235
Introduction, 234
isleapyear(), 244
ismainsourcefile(), 248
isprime(), 240
isspecial(), 239
isvowel(), 239
JustFileName(), 236
JustFilePath(), 236
lcm(), 243
linecount(), 240
list2file(), 241
makedir(), 248
map(), 237
matrixmulti(), 245
matrixtrans(), 245
newlist(), 238
palindrome(), 244
permutation(), 246
print(), 235
prodlist(), 243
puts(), 235
readline(), 246
sign(), 241
sleep(), 247
split(), 238
splitmany(), 238
startswith(), 242
substring(), 247
sumlist(), 243
times(), 237
TrimAll(), 249
TrimLeft(), 249
TrimRight(), 249
value(), 237
StdLib functions and classes written in Ring
What is new in Ring 1.1?, 61
Step Option
Control Structures - First Style, 100
Str2Hex()
Data Type, 145
str2list() and list2str()
Strings, 132
strcmp()
Strings, 132
String Class
Stdlib Classes, 252
String Literals
Strings, 128
String()
Data Type, 143
Strings
Access String Letters, 128
Convert Letters Case, 128
Copy(), 130
Find SubString, 131
Get Number of Characters from position, 131
Get String Length, 128
Get Substring from position to end, 131
Introduction, 127
Left(), 129
Lines(), 130
Right(), 129
str2list() and list2str(), 132
strcmp(), 132
String Literals, 128
Substr(), 130
Transform Substring To Another Substring, 131
Trim(), 130
StyleFunctions Class
Web Development (CGI Library), 347
Substr()
Strings, 130
substring()
Stdlib Functions, 247
sumlist()
Stdlib Functions, 243
Summary of Scope Rules
Scope Rules, 559
Super Man 2016 Game
Game Engine for 2D Games, 414
Swap Items
Lists, 127
Switch Between Two Images
RingLibSDL, 369
Switch Statement
Control Structures - First Style, 98
Control Structures - Second Style, 105
Control Structures - Third Style, 108
Syntax Flexibility
Index 879
3. Ring Documentation, Release 1.4.1
Change Language Keywords, 565
Change Language Operators, 566
Introduction, 564
Load Syntax Files, 566
Using ’case’ as ’on’ in switch statements, 572
Using ’def’ as ’func’ in functions/methods defini-
tion, 572
Using ’put’ and ’get’ as ’see’ and ’give’, 572
Using () around the function parameters, 566
in the start of the variable name, 569
Using braces to start and end different control struc-
tures, 571
Using Semi-colon after and between statements, 568
Using the ’else’ keyword as ’other’ in switch state-
ment, 569
Using the ’elseif’ keyword as ’but’ in if statement,
569
Using the ’end’ keyword in different control struc-
tures, 570
What is new in Ring 1.1?, 58
SysGet() Function
System Functions, 161
System Class
Stdlib Classes, 265
System Functions
ChDir() Function, 166
CurrentDir() Function, 165
Example, 163
ExeFileName() Function, 166
ExeFolder() Function, 166
Get Active Source File Name, 165
Get Command Line Arguments, 164
Introduction, 160
IsAndroid() Function, 163
IsFreeBSD() Function, 163
IsLinux() Function, 163
IsMacOSX() Function, 162
IsMSDOS() Function, 162
IsUnix() Function, 162
IsWindows() Function, 162
IsWindows64() Function, 162
PrevFileName() Function, 165
SysGet() Function, 161
System() Function, 161
Version() Function, 166
Windowsnl() Function, 163
System() Function
System Functions, 161
Tempfile()
Files, 155
Templates
Web Development (CGI Library), 312
Tempname()
Files, 155
Testing
How to contribute?, 72
Text Class
Game Engine for 2D Games, 379
The Cards Game
Demo Programs, 518
Desktop and Mobile Development, 518
The Designer Windows
Form Designer, 539
The Difference between Qt and RingQt
Desktop and Mobile Development, 528
The documentation says functional programming is sup-
ported, but then this happens?
Frequently Asked Questions, 814
The First GUI Application
Desktop and Mobile Development, 429
The Natural Library
What is new in Ring 1.4?, 30
The Properties
Form Designer, 539
The Self Object
Scope Rules, 547
Threads
Graphics and Game Programming, 366
Threads Support
Code Generator, 622
Three Scopes
Scope Rules, 546
TicTacToe Game
Applications developed in little hours, 3
Time()
Date and Time, 134
TimeList()
Date and Time, 135
times()
Stdlib Functions, 237
Transaction Example
MySQL Functions, 190
Transactions and Using Commit and Rollback
ODBC Functions, 180
Transform Substring To Another Substring
Strings, 131
Transparent Image
Graphics and Game Programming, 365
Transparent Implementation
Language Design, 18
Tree Class
Stdlib Classes, 258
Trim()
Strings, 130
TrimAll()
Stdlib Functions, 249
TrimLeft()
Index 880
4. Ring Documentation, Release 1.4.1
Stdlib Functions, 249
TrimRight()
Stdlib Functions, 249
TrueType Fonts
Graphics and Game Programming, 362
Try/Carch/Done
Eval() and Debugging, 167
Trying to be natural
Language Design, 17
Type()
Data Type, 139
Ungetc()
Files, 157
Unsigned()
Mathematical Functions, 149
Update the Android SDK
Building RingQt Applications for Mobile, 530
Upload Files
Web Development (CGI Library), 306
URL Encode
Web Development (CGI Library), 311
Use TTF Fonts
RingLibSDL, 371
Users registration and Login
Web Development (CGI Library), 332
Using ’<’ and ’:’ operators as ’from’ keyword
What is new in Ring 1.3?, 47
Using ’case’ as ’on’ in switch statements
Syntax Flexibility, 572
Using ’def’ as ’func’ in functions/methods definition
Syntax Flexibility, 572
Using ’put’ and ’get’ as ’see’ and ’give’
Syntax Flexibility, 572
Using () around the function parameters
Syntax Flexibility, 566
in the start of the variable name
Syntax Flexibility, 569
Using Atom
Using Other Code Editors, 89
Using Bootstrap Library using Functions
Web Development (CGI Library), 326
Using Bootstrap Library using Objects
Web Development (CGI Library), 327
Using Braces to access objects inside Class Methods
Scope Rules, 550
Using braces to escape from the current object scope
Scope Rules, 558
Using braces to start and end different control structures
Syntax Flexibility, 571
Using C/C++ Compiler and Linker
Distributing Ring Application, 575
Using configuration file that wrap C++ library
Code Generator, 624
Using Emacs Editor
Using Other Code Editors, 91
Using Eval() with our Natural Code
Natural Language Programming, 284
Using Geany
Using Other Code Editors, 88
Using Layout
Desktop and Mobile Development, 430
Using Layouts
Form Designer, 545
Using Lists during definition
Lists, 125
Using Many Source Code Files
Program Structure, 119
Using Notepad++
Using Other Code Editors, 87
Using NULL instead of NULLPointer()
What is new in Ring 1.2?, 55
Using Object.Attribute
Scope Rules, 547
Using Other Code Editors
Introduction, 86
Using Atom, 89
Using Emacs Editor, 91
Using Geany, 88
Using Notepad++, 87
Using Sublime Text 2, 90
Using Visual Studio IDE, 91
Using QCheckBox
Desktop and Mobile Development, 456
Using QComboBox Class
Desktop and Mobile Development, 438
Using QDateEdit
Desktop and Mobile Development, 451
Using QDesktopWidget Class
Desktop and Mobile Development, 491
Using QDial
Desktop and Mobile Development, 452
Using QDockWidget
Desktop and Mobile Development, 444
Using QFrame
Desktop and Mobile Development, 461
Using QInputDialog Class
Desktop and Mobile Development, 482
Using qLCDNumber
Desktop and Mobile Development, 479
Using QProgressBar
Desktop and Mobile Development, 448
Using QProgressBar and Timer
Desktop and Mobile Development, 471
Using QRadioButton and QButtonGroup
Desktop and Mobile Development, 457
Using QSlider
Desktop and Mobile Development, 449
Index 881
5. Ring Documentation, Release 1.4.1
Using QSpinBox
Desktop and Mobile Development, 449
Using QTableWidget
Desktop and Mobile Development, 447
Using QTabWidget
Desktop and Mobile Development, 445
Using QTreeView and QFileSystemModel
Desktop and Mobile Development, 436
Using QTreeWidget and QTreeWidgetItem
Desktop and Mobile Development, 437
Using QWebView
Desktop and Mobile Development, 455
Using RingZip Classes
RingZip, 353
Using Self.Attribute
Object Oriented Programming, 211
Using Self.Attribute in the Class Region to define new at-
tributes
What is new in Ring 1.1?, 65
Using Semi-colon after and between statements
Syntax Flexibility, 568
Using Sublime Text 2
Using Other Code Editors, 90
Using the ’else’ keyword as ’other’ in switch statement
Syntax Flexibility, 569
Using the ’elseif’ keyword as ’but’ in if statement
Syntax Flexibility, 569
Using the ’end’ keyword in different control structures
Syntax Flexibility, 570
Using the Natural Library
Defining Commands, 292
Defining commands using classes, 295
Introduction, 289
Natural Library - Demo Program, 290
Operators, 294
Using the QColorDialog Class
Desktop and Mobile Development, 478
Using the QFileDialog Class
Desktop and Mobile Development, 473
Using the QListWidget Class
Desktop and Mobile Development, 433
Using the QTextEdit Class
Desktop and Mobile Development, 432
Using the QTimer Class
Desktop and Mobile Development, 470
Using the tool
Code Generator, 616
Using This.Attribute in nested Braces inside the Class
Methods
What is new in Ring 1.1?, 65
Using Visual Studio IDE
Using Other Code Editors, 91
value()
Stdlib Functions, 237
Variables
Deep Copy, 93
Dynamic Typing, 93
Introduction, 92
Weakly Typed, 94
Variables Scope
Functions, 117
varptr()
Low Level Functions, 592
Version() Function
System Functions, 166
Virtual Machine Instructions
Reference, 847
Visual Implementation
Language Design, 19
Weakly Typed
Variables, 94
Web Development (CGI Library)
Application Class, 344
Configure the Apache web server, 297
Cookies, 309
CRUD Example using MVC, 330
Database, ModelBase & ControllerBase classes, 338
Generating Pages using Objects, 321
Gradient, 320
Hash Functions, 315
Hello World Program using the Web Library, 298
HTML Lists, 318
HTML Special Characters, 314
HTML Tables, 319
HTTP Get Example, 299
HTTP POST Example, 304
Introduction, 296
Page Class, 345
Random Image, 317
Ring CGI Hello World Program, 298
ScriptFunctions Class, 347
StyleFunctions Class, 347
Templates, 312
Upload Files, 306
URL Encode, 311
Users registration and Login, 332
Using Bootstrap Library using Functions, 326
Using Bootstrap Library using Objects, 327
Web Library Features, 299
WebLib API, 343
Web Library Features
Web Development (CGI Library), 299
WebLib API
Web Development (CGI Library), 343
Weight History Application
Desktop and Mobile Development, 499
Index 882
6. Ring Documentation, Release 1.4.1
Werdy Application
Applications developed in little hours, 5
What about predefined parameters or optional parameters
in functions?
Frequently Asked Questions, 823
What about the Boolean values in Ring?
Frequently Asked Questions, 816
What are the advantages to using Ring over C# or Java?
Frequently Asked Questions, 814
What are the advantages to using Ring over Lisp or
Smalltalk?
Frequently Asked Questions, 811
What are the advantages to using Ring over native C or
C++?
Frequently Asked Questions, 812
What are the advantages to using Ring over Python and
Ruby?
Frequently Asked Questions, 813
What are the advantages to using Ring over Tcl and Lua?
Frequently Asked Questions, 814
What happens when we create a new object?
Frequently Asked Questions, 819
What is new in Ring 1.1?
Better Code Generator for Extensions, 65
Better Documentation, 65
Better Natural Language Programming Support, 57
Game Engine for 2D Games, 63
Generate/Execute Ring Object Files (*.ringo), 58
Introduction, 56
List of changes and new features, 57
New Functions and Changes, 60
RingLibSDL, 63
RingSQLite, 64
StdLib functions and classes written in Ring, 61
Syntax Flexibility, 58
Using Self.Attribute in the Class Region to define
new attributes, 65
Using This.Attribute in nested Braces inside the
Class Methods, 65
What is new in Ring 1.2?
Better Call Command, 55
Better Functions, 52
Better Quality, 55
Better Ring Notepad, 52
Better RingQt, 52
Display Warnings Option, 55
Introduction, 50
List of changes and new features, 51
New Functions, 51
Objects Library for RingQt, 53
RingLibCurl, 54
Using NULL instead of NULLPointer(), 55
What is new in Ring 1.3?
Better Loop|Exit Command, 46
Better Ring Notepad, 42
Better RingQt, 38
Better StdLib, 46
Embedding Ring in Ring without sharing the State,
48
Form Designer, 49
Introduction, 37
List of changes and new features, 38
New Functions, 47
Return Self by Reference, 47
Ring mode for Emacs Editor, 45
RingZip Library, 48
Using ’<’ and ’:’ operators as ’from’ keyword, 47
What is new in Ring 1.4.1?
Better RingQt, 27
Better Scripts for Building from Source Code, 25
Better StdLib, 26
Introduction, 24
List of changes and new features, 25
New Sample : Sixteen Puzzle, 27
New Style to Ring Notepad, 26
What is new in Ring 1.4?
Better RingQt, 36
Better StdLib, 34
Better WebLib, 34
Change: Basic Extensions are separated from
RingVM, 29
Convert between Numbers and Bytes, 33
Introduction, 28
List of changes and new features, 29
New Style to Ring Notepad, 32
Qt Class Convertor, 36
RingREPL, 32
The Natural Library, 30
What is the difference between Ring and Python? And is
Ring Open Source?
Frequently Asked Questions, 812
Where can I write a program and execute it?
Frequently Asked Questions, 822
While Loop
Control Structures - First Style, 99
Control Structures - Third Style, 109
Why do we need Yet Another Programming Language
(YAPL)?
Frequently Asked Questions, 810
Why I get a strange result when printing nl with lists?
Frequently Asked Questions, 824
Why I get Calling Function without definition Error?
Frequently Asked Questions, 835
Why Ring is largely focussed on UI creation?
Frequently Asked Questions, 812
Why Ring is weakly typed?
Frequently Asked Questions, 811
Why Ring uses ’See’, ’Give’, ’But’ and ’Ok’ Keywords?
Index 883
7. Ring Documentation, Release 1.4.1
Frequently Asked Questions, 815
Why Ring?
Language Design, 16
Why setClickEvent() doesn’t see the object methods di-
rectly?
Frequently Asked Questions, 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?
Frequently Asked Questions, 815
Why the window title bar is going outside the screen?
Frequently Asked Questions, 829
Why this example use the GetChar() twice?
Frequently Asked Questions, 826
Why we don’t use () after the qApp class name?
Frequently Asked Questions, 829
Why you can specify the number of loops you want to
break out of?
Frequently Asked Questions, 815
Window Flags
Form Designer, 544
Windowsnl() Function
System Functions, 163
Wrap structures
Code Generator, 618
Wrapping C++ Classes
Code Generator, 623
Write file using Write()
Files, 152
Writing Comments
Getting Started - First Style, 75
Getting Started - Second Style, 77
Getting Started - Third Style, 79
Zip Class Reference
RingZip, 355
ZipEntry Class Reference
RingZip, 355
Index 884