SlideShare a Scribd company logo
1 of 10
Download to read offline
Ring Documentation, Release 1.8
In the previous example we have the local variable name.
The value of this variable will be set to “mahmoud” instead of the object attribute.
Solution (1) : Just use Self
func main
name = "nice"
o1 = new person {self.name="mahmoud" address="Egypt" phone = 000 }
see o1
class person
name
address
phone
Solution (2) : Change the Local variable name
func main
cName = "nice"
o1 = new person {name="mahmoud" address="Egypt" phone = 000 }
see o1
class person
name
address
phone
Solution (3) : Change Braces and use the Dot operator
func main
name = "nice"
o1 = new person
o1.name ="mahmoud"
o1.address ="Egypt"
o1.phone = 000
see o1
class person
name
address
phone
65.9 Using Braces to access objects inside Class Methods
Remember that we have Three scopes (Local Scope, Object Scope and Global Scope) and when we are inside a class
method, we expect that we have access to the object attributes and methods and this is true until we use braces to
access another object attributes and methods because in this case our object scope will be switched to another object.
new point { test() }
class point
x=10 y=20
func test
see x + nl + y + nl # works fine
myobj = new otherclass {
see name + nl
see x + nl + y + nl # error !
65.9. Using Braces to access objects inside Class Methods 761
Ring Documentation, Release 1.8
}
class otherclass
name = "test"
Output:
10
20
test
Line 8 Error (R24) : Using uninitialized variable : x
In method test() in file methodbraceerror.ring
called from line 5 in file methodbraceerror.ring
Now what we will do to solve the previous problem?
Solution (1) : Write the code that access the class attributes outside braces.
new point { test() }
class point
x=10 y=20
func test
see x + nl + y + nl # works fine
myobj = new otherclass {
see name + nl
}
see x + nl + y + nl # Outside braces - works fine
class otherclass
name = "test"
Output:
10
20
test
10
20
Solution (2) : Don’t Use Braces
new point { test() }
class point
x=10 y=20
func test
see x + nl + y + nl
myobj = new otherclass
see myobj.name
see x + nl + y + nl
class otherclass
name = "test"
Solution (3) : Copy the self object
We may use this solution if we want to use braces and get access to the class attributes (Just Reading).
65.9. Using Braces to access objects inside Class Methods 762
Ring Documentation, Release 1.8
new point { test() }
class point
x=10 y=20
func test
oSelf = self
see x + nl + y + nl
myobj = new otherclass {
see name + nl
see oself.x + nl + oself.y + nl
}
class otherclass
name = "test"
Output:
10
20
test
10
20
Now look at this line
oself = self
The problem with the previous line is that we will have a new copy from the object Because in Ring the assignment
operator copy lists and objects by value (not by reference).
When we access the new object attributes (reading) we don’t have problems
But if we modified the object attributes (Then we will modify the copy!).
Note: We can use braces again with the copy
new point { test() }
class point
x=10 y=20
func test
oSelf = self
see x + nl + y + nl
myobj = new otherclass {
see name + nl
oSelf {
see x + nl + y + nl
}
}
class otherclass
name = "test"
In a GUI application, we may create a class contains the window objects as attributes to be able to access the controls
from different methods. Remember the previous information when you try to access objects using braces inside
methods because in this case you can’t access the object attributes directly and if you copied the self object you will
work on a copy and the new controls that you create will be related to the copy and you can’t access them.
65.9. Using Braces to access objects inside Class Methods 763
Ring Documentation, Release 1.8
65.10 Accessing the class attributes from braces inside class meth-
ods
We access the class attributes directly from the class methods, also we have the choice to use the Self reference before
the attribute/method name. Using Braces {} inside class method change the active object scope and prevent us from
getting direct access to the class attributes. Also using Self will not help because the Self reference will be changed to
the object that we access using Braces.
In this case if you want to read an attribute you have to copy the Self object before using Braces and if you want to
modify an attribute you have to the copy from local variable to the object attribute after using Braces.
This case happens when you want to read/modify attribute insead braces.
Class MyApp
oCon # Attribute
# some code here
Func OpenDatabase
# some code here
new QSqlDatabase() {
oCon = addDatabase("QSQLITE") {
setDatabaseName("weighthistory.db")
open()
}
}
self.oCon = oCon
# some code here
In the previous example we want to create the connection object and save it inside the oCon attribute.
The object is an output from the addDatabase() method that we use after accessing the QSQLDatabase() object.
Inside braces we can’t use the Self reference to use the object created from the MyApp class, Because the Self reference
here will be to the object that we access using Braces.
We solved the problem in the previous example by creating a local variable called oCon then after Braces we copied
that variable to the oCon attribute.
The next code is another solution.
Class MyApp
oCon # Attribute
# some code here
Func OpenDatabase
# some code here
oCon = new QSqlDatabase()
oCon = oCon.addDatabase("QSQLITE") {
setDatabaseName("weighthistory.db")
Open()
}
# some code here
The next code is a better solution.
65.10. Accessing the class attributes from braces inside class methods 764
Ring Documentation, Release 1.8
Class MyApp
oCon # Attribute
# some code here
Func OpenDatabase
# some code here
new QSqlDatabase() {
this.oCon = addDatabase("QSQLITE") {
setDatabaseName("weighthistory.db")
Open()
}
}
# some code here
Note: We used this.attribute to access the class attribute (oCon) while we are inside Braces.
65.11 Creating a Class for each Window in GUI applications
A good way for creating classes for windows is to define the window directly after the class name
In this area you can use nested braces without problems to define the window and the controls, and they will be
attributes that you can access from methods.
Example:
Load "guilib.ring"
new qApp
{
$ObjectName = "oFirstWindow"
oFirstWindow = new FirstWindow
$ObjectName = "oSecondWindow"
oSecondWindow = new SecondWindow
exec()
}
Class FirstWindow
win = new qWidget() {
setgeometry(0,50,300,200)
setWindowTitle("First Window")
label1 = new qLabel(win)
{
setgeometry(10,10,300,30)
setText("0")
}
btn1 = new qPushButton(win)
{
move(100,100)
setText("Increment")
setClickEvent($ObjectName+".increment()")
}
65.11. Creating a Class for each Window in GUI applications 765
Ring Documentation, Release 1.8
show()
}
Func Increment
label1 {
setText( "" + ( 0 + text() + 1 ) )
}
Class SecondWindow
win = new qWidget() {
setgeometry(400,50,300,200)
setWindowTitle("Second Window")
label1 = new qLabel(win)
{
setgeometry(10,10,300,30)
setText("0")
}
btn1 = new qPushButton(win)
{
move(100,100)
setText("Decrement")
setClickEvent($ObjectName+".decrement()")
}
show()
}
Func Decrement
label1 {
setText( "" + ( 0 + text() - 1 ) )
}
65.12 Conflict between self inside braces and self in the class region
In the class region (after the class name and before any methods) we define the attributes.
In this region we have access to the global scope and the local scope will point to the object scope.
Three Scopes
• Global Scope —> Gloabl Scope
• Object Scope —> Object Scope
• Local Scope —> Object Scope
Look at this example
New Account {
see aFriends
}
Class Account
name = "Mahmoud"
aFriends = []
aFriends + new Friend {
name = "Gal"
65.12. Conflict between self inside braces and self in the class region 766
Ring Documentation, Release 1.8
}
aFriends + new Friend {
name = "Bert"
}
Class Friend
name
Output:
name: NULL
name: NULL
The problem in the previous example is that the Class account contains an attribute called “name” and the Friend class
contains an attribue called “name” also.
If you tried using self.name inside braces you will get the same result!
New Account {
see aFriends
}
Class Account
name = "Mahmoud"
aFriends = []
aFriends + new Friend {
self.name = "Gal"
}
aFriends + new Friend {
self.name = "Bert"
}
Class Friend
name
So why using self.name inside braces doesn’t solve this conflict?
Because after the class region we have
• global scope —> global scope
• object scope —> object scope (Account Class)
• local scope —> local scope (Account Class)
When we use braces we change the object scope, so we have
• global scope —> global scope
• object scope —> object scope (Friend Class)
• local scope —> local scope (Account Class)
Ring search in the local scope first, so using self.name will use the Account class.
There are many solution
Solution (1) : Access the object through the list
New Account {
see aFriends
}
Class Account
65.12. Conflict between self inside braces and self in the class region 767
Ring Documentation, Release 1.8
name = "Mahmoud"
aFriends = []
aFriends + new Friend
aFriends[len(aFriends)] {
aFriends[len(aFriends)].name = "Gal"
}
aFriends + new Friend
aFriends[len(aFriends)] {
aFriends[len(aFriends)].name = "Bert"
}
Class Friend
name
Solution (2) : Create Method in the friend class to set the name attribute.
New Account {
see aFriends
}
Class Account
name = "Mahmoud"
aFriends = []
aFriends + new Friend {
setname("Gal")
}
aFriends + new Friend {
setname("Bert")
}
Class Friend
name
func setname cName
name = cName
Solution (3) : Create a method in the account class to set the attribute
New Account {
see aFriends
}
Class Account
name = "Mahmoud"
aFriends = []
friend("Gal")
friend("Bert")
func friend cName
aFriends + new Friend {
name = cName
}
Class Friend
name
Solution (4) : Declarative Programming
New Account {
name = "mahmoud"
friend {
65.12. Conflict between self inside braces and self in the class region 768
Ring Documentation, Release 1.8
name = "Gal"
}
friend {
name = "Bert"
}
see aFriends
}
Class Account
name
aFriends = []
friend
func getfriend
aFriends + new Friend
return aFriends[len(aFriends)]
Class Friend
name
Output:
name: Gal
name: Bert
65.13 Using braces to escape from the current object scope
Since braces change the current object scope to another object. we can use it to do some work without modifying the
class attributes and using the same variable names.
new point {x=10 y=20 z=30 start() }
class point x y z
func start
see self # print the x y z values (10,20,30)
new Local {
x = 100
y = 200
z = 300
}
see self # print the x y z values (10,20,30)
see x + nl # will print 100
see y + nl # will print 200
see z + nl # will print 300
Self { # NO Advantage - Search is done in local scope first
see x + nl # will print 100
see y + nl # will print 200
see z + nl # will print 300
}
see self.x + nl # will print 10
see self.y + nl # will print 20
see self.z + nl # will print 30
class Local
Output:
x: 10.000000
y: 20.000000
65.13. Using braces to escape from the current object scope 769
Ring Documentation, Release 1.8
z: 30.000000
x: 10.000000
y: 20.000000
z: 30.000000
100
200
300
100
200
300
10
20
30
65.14 The For Loops uses the local scope
Starting from Ring 1.8, when the For Loop defines new identifier (variable) it will define it in the local scope.
Example:
x = 10
? x # Print 10
test1()
? x # Print 10
test2()
? x # Print 10
func test1
for x = 1 to 5
next
? x # Print 6
func test2
list = 1:5
for x in list
next
? x # Print NULL (The "For In" loop will kill the reference after the loop)
Output:
10
6
10
NULL
10
65.15 Summary of Scope Rules
At first remember that
1 - Each programming language comes with it’s scope rules based on the language goals
2 - Programming in the small is different than Programming in the Large
3 - Some programming language are designed for developing small programs while others are designed for large
programs
65.14. The For Loops uses the local scope 770

More Related Content

What's hot

Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScriptJulie Iskander
 
Object Oriented Programming - 5. Class & Object
Object Oriented Programming - 5. Class & ObjectObject Oriented Programming - 5. Class & Object
Object Oriented Programming - 5. Class & ObjectAndiNurkholis1
 
11. session 11 functions and objects
11. session 11   functions and objects11. session 11   functions and objects
11. session 11 functions and objectsPhúc Đỗ
 
The Ring programming language version 1.6 book - Part 33 of 189
The Ring programming language version 1.6 book - Part 33 of 189The Ring programming language version 1.6 book - Part 33 of 189
The Ring programming language version 1.6 book - Part 33 of 189Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 56 of 88
The Ring programming language version 1.3 book - Part 56 of 88The Ring programming language version 1.3 book - Part 56 of 88
The Ring programming language version 1.3 book - Part 56 of 88Mahmoud Samir Fayed
 
Java OOP Programming language (Part 8) - Java Database JDBC
Java OOP Programming language (Part 8) - Java Database JDBCJava OOP Programming language (Part 8) - Java Database JDBC
Java OOP Programming language (Part 8) - Java Database JDBCOUM SAOKOSAL
 
JS Fest 2019. Max Koretskiy. A sneak peek into super optimized code in JS fra...
JS Fest 2019. Max Koretskiy. A sneak peek into super optimized code in JS fra...JS Fest 2019. Max Koretskiy. A sneak peek into super optimized code in JS fra...
JS Fest 2019. Max Koretskiy. A sneak peek into super optimized code in JS fra...JSFestUA
 
Scala traits training by Sanjeev Kumar @Kick Start Scala traits & Play, organ...
Scala traits training by Sanjeev Kumar @Kick Start Scala traits & Play, organ...Scala traits training by Sanjeev Kumar @Kick Start Scala traits & Play, organ...
Scala traits training by Sanjeev Kumar @Kick Start Scala traits & Play, organ...Sanjeev_Knoldus
 
Java OOP Programming language (Part 4) - Collection
Java OOP Programming language (Part 4) - CollectionJava OOP Programming language (Part 4) - Collection
Java OOP Programming language (Part 4) - CollectionOUM SAOKOSAL
 
The Ring programming language version 1.7 book - Part 39 of 196
The Ring programming language version 1.7 book - Part 39 of 196The Ring programming language version 1.7 book - Part 39 of 196
The Ring programming language version 1.7 book - Part 39 of 196Mahmoud Samir Fayed
 
The Ring programming language version 1.4.1 book - Part 9 of 31
The Ring programming language version 1.4.1 book - Part 9 of 31The Ring programming language version 1.4.1 book - Part 9 of 31
The Ring programming language version 1.4.1 book - Part 9 of 31Mahmoud Samir Fayed
 
Creating a Custom Tanimoto or Cosine Similarity Vector Operator for Lucene / ...
Creating a Custom Tanimoto or Cosine Similarity Vector Operator for Lucene / ...Creating a Custom Tanimoto or Cosine Similarity Vector Operator for Lucene / ...
Creating a Custom Tanimoto or Cosine Similarity Vector Operator for Lucene / ...Lucidworks
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
CS101- Introduction to Computing- Lecture 26
CS101- Introduction to Computing- Lecture 26CS101- Introduction to Computing- Lecture 26
CS101- Introduction to Computing- Lecture 26Bilal Ahmed
 
11slide
11slide11slide
11slideIIUM
 
Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...
Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...
Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...scalaconfjp
 
The Ring programming language version 1.2 book - Part 5 of 84
The Ring programming language version 1.2 book - Part 5 of 84The Ring programming language version 1.2 book - Part 5 of 84
The Ring programming language version 1.2 book - Part 5 of 84Mahmoud Samir Fayed
 
Di web tech mail (no subject)
Di web tech mail   (no subject)Di web tech mail   (no subject)
Di web tech mail (no subject)shubhamvcs
 

What's hot (20)

Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScript
 
Object Oriented Programming - 5. Class & Object
Object Oriented Programming - 5. Class & ObjectObject Oriented Programming - 5. Class & Object
Object Oriented Programming - 5. Class & Object
 
11. session 11 functions and objects
11. session 11   functions and objects11. session 11   functions and objects
11. session 11 functions and objects
 
The Ring programming language version 1.6 book - Part 33 of 189
The Ring programming language version 1.6 book - Part 33 of 189The Ring programming language version 1.6 book - Part 33 of 189
The Ring programming language version 1.6 book - Part 33 of 189
 
The Ring programming language version 1.3 book - Part 56 of 88
The Ring programming language version 1.3 book - Part 56 of 88The Ring programming language version 1.3 book - Part 56 of 88
The Ring programming language version 1.3 book - Part 56 of 88
 
Java OOP Programming language (Part 8) - Java Database JDBC
Java OOP Programming language (Part 8) - Java Database JDBCJava OOP Programming language (Part 8) - Java Database JDBC
Java OOP Programming language (Part 8) - Java Database JDBC
 
JS Fest 2019. Max Koretskiy. A sneak peek into super optimized code in JS fra...
JS Fest 2019. Max Koretskiy. A sneak peek into super optimized code in JS fra...JS Fest 2019. Max Koretskiy. A sneak peek into super optimized code in JS fra...
JS Fest 2019. Max Koretskiy. A sneak peek into super optimized code in JS fra...
 
Scala traits training by Sanjeev Kumar @Kick Start Scala traits & Play, organ...
Scala traits training by Sanjeev Kumar @Kick Start Scala traits & Play, organ...Scala traits training by Sanjeev Kumar @Kick Start Scala traits & Play, organ...
Scala traits training by Sanjeev Kumar @Kick Start Scala traits & Play, organ...
 
Java OOP Programming language (Part 4) - Collection
Java OOP Programming language (Part 4) - CollectionJava OOP Programming language (Part 4) - Collection
Java OOP Programming language (Part 4) - Collection
 
The Ring programming language version 1.7 book - Part 39 of 196
The Ring programming language version 1.7 book - Part 39 of 196The Ring programming language version 1.7 book - Part 39 of 196
The Ring programming language version 1.7 book - Part 39 of 196
 
The Ring programming language version 1.4.1 book - Part 9 of 31
The Ring programming language version 1.4.1 book - Part 9 of 31The Ring programming language version 1.4.1 book - Part 9 of 31
The Ring programming language version 1.4.1 book - Part 9 of 31
 
Creating a Custom Tanimoto or Cosine Similarity Vector Operator for Lucene / ...
Creating a Custom Tanimoto or Cosine Similarity Vector Operator for Lucene / ...Creating a Custom Tanimoto or Cosine Similarity Vector Operator for Lucene / ...
Creating a Custom Tanimoto or Cosine Similarity Vector Operator for Lucene / ...
 
9 cm604.14
9 cm604.149 cm604.14
9 cm604.14
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
CS101- Introduction to Computing- Lecture 26
CS101- Introduction to Computing- Lecture 26CS101- Introduction to Computing- Lecture 26
CS101- Introduction to Computing- Lecture 26
 
11slide
11slide11slide
11slide
 
Spsl v unit - final
Spsl v unit - finalSpsl v unit - final
Spsl v unit - final
 
Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...
Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...
Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...
 
The Ring programming language version 1.2 book - Part 5 of 84
The Ring programming language version 1.2 book - Part 5 of 84The Ring programming language version 1.2 book - Part 5 of 84
The Ring programming language version 1.2 book - Part 5 of 84
 
Di web tech mail (no subject)
Di web tech mail   (no subject)Di web tech mail   (no subject)
Di web tech mail (no subject)
 

Similar to The Ring programming language version 1.8 book - Part 80 of 202

The Ring programming language version 1.9 book - Part 84 of 210
The Ring programming language version 1.9 book - Part 84 of 210The Ring programming language version 1.9 book - Part 84 of 210
The Ring programming language version 1.9 book - Part 84 of 210Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 69 of 180
The Ring programming language version 1.5.1 book - Part 69 of 180The Ring programming language version 1.5.1 book - Part 69 of 180
The Ring programming language version 1.5.1 book - Part 69 of 180Mahmoud Samir Fayed
 
The Ring programming language version 1.4.1 book - Part 20 of 31
The Ring programming language version 1.4.1 book - Part 20 of 31The Ring programming language version 1.4.1 book - Part 20 of 31
The Ring programming language version 1.4.1 book - Part 20 of 31Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 75 of 189
The Ring programming language version 1.6 book - Part 75 of 189The Ring programming language version 1.6 book - Part 75 of 189
The Ring programming language version 1.6 book - Part 75 of 189Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 85 of 212
The Ring programming language version 1.10 book - Part 85 of 212The Ring programming language version 1.10 book - Part 85 of 212
The Ring programming language version 1.10 book - Part 85 of 212Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 40 of 189
The Ring programming language version 1.6 book - Part 40 of 189The Ring programming language version 1.6 book - Part 40 of 189
The Ring programming language version 1.6 book - Part 40 of 189Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 77 of 196
The Ring programming language version 1.7 book - Part 77 of 196The Ring programming language version 1.7 book - Part 77 of 196
The Ring programming language version 1.7 book - Part 77 of 196Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 55 of 88
The Ring programming language version 1.3 book - Part 55 of 88The Ring programming language version 1.3 book - Part 55 of 88
The Ring programming language version 1.3 book - Part 55 of 88Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 5 of 88
The Ring programming language version 1.3 book - Part 5 of 88The Ring programming language version 1.3 book - Part 5 of 88
The Ring programming language version 1.3 book - Part 5 of 88Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 37 of 181
The Ring programming language version 1.5.2 book - Part 37 of 181The Ring programming language version 1.5.2 book - Part 37 of 181
The Ring programming language version 1.5.2 book - Part 37 of 181Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 53 of 84
The Ring programming language version 1.2 book - Part 53 of 84The Ring programming language version 1.2 book - Part 53 of 84
The Ring programming language version 1.2 book - Part 53 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 82 of 184
The Ring programming language version 1.5.3 book - Part 82 of 184The Ring programming language version 1.5.3 book - Part 82 of 184
The Ring programming language version 1.5.3 book - Part 82 of 184Mahmoud Samir Fayed
 
The Ring programming language version 1.5.4 book - Part 38 of 185
The Ring programming language version 1.5.4 book - Part 38 of 185The Ring programming language version 1.5.4 book - Part 38 of 185
The Ring programming language version 1.5.4 book - Part 38 of 185Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 36 of 180
The Ring programming language version 1.5.1 book - Part 36 of 180The Ring programming language version 1.5.1 book - Part 36 of 180
The Ring programming language version 1.5.1 book - Part 36 of 180Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 78 of 196
The Ring programming language version 1.7 book - Part 78 of 196The Ring programming language version 1.7 book - Part 78 of 196
The Ring programming language version 1.7 book - Part 78 of 196Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 30 of 181
The Ring programming language version 1.5.2 book - Part 30 of 181The Ring programming language version 1.5.2 book - Part 30 of 181
The Ring programming language version 1.5.2 book - Part 30 of 181Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 27 of 84
The Ring programming language version 1.2 book - Part 27 of 84The Ring programming language version 1.2 book - Part 27 of 84
The Ring programming language version 1.2 book - Part 27 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 20 of 84
The Ring programming language version 1.2 book - Part 20 of 84The Ring programming language version 1.2 book - Part 20 of 84
The Ring programming language version 1.2 book - Part 20 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 78 of 84
The Ring programming language version 1.2 book - Part 78 of 84The Ring programming language version 1.2 book - Part 78 of 84
The Ring programming language version 1.2 book - Part 78 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.5.4 book - Part 31 of 185
The Ring programming language version 1.5.4 book - Part 31 of 185The Ring programming language version 1.5.4 book - Part 31 of 185
The Ring programming language version 1.5.4 book - Part 31 of 185Mahmoud Samir Fayed
 

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

The Ring programming language version 1.9 book - Part 84 of 210
The Ring programming language version 1.9 book - Part 84 of 210The Ring programming language version 1.9 book - Part 84 of 210
The Ring programming language version 1.9 book - Part 84 of 210
 
The Ring programming language version 1.5.1 book - Part 69 of 180
The Ring programming language version 1.5.1 book - Part 69 of 180The Ring programming language version 1.5.1 book - Part 69 of 180
The Ring programming language version 1.5.1 book - Part 69 of 180
 
The Ring programming language version 1.4.1 book - Part 20 of 31
The Ring programming language version 1.4.1 book - Part 20 of 31The Ring programming language version 1.4.1 book - Part 20 of 31
The Ring programming language version 1.4.1 book - Part 20 of 31
 
The Ring programming language version 1.6 book - Part 75 of 189
The Ring programming language version 1.6 book - Part 75 of 189The Ring programming language version 1.6 book - Part 75 of 189
The Ring programming language version 1.6 book - Part 75 of 189
 
The Ring programming language version 1.10 book - Part 85 of 212
The Ring programming language version 1.10 book - Part 85 of 212The Ring programming language version 1.10 book - Part 85 of 212
The Ring programming language version 1.10 book - Part 85 of 212
 
The Ring programming language version 1.6 book - Part 40 of 189
The Ring programming language version 1.6 book - Part 40 of 189The Ring programming language version 1.6 book - Part 40 of 189
The Ring programming language version 1.6 book - Part 40 of 189
 
The Ring programming language version 1.7 book - Part 77 of 196
The Ring programming language version 1.7 book - Part 77 of 196The Ring programming language version 1.7 book - Part 77 of 196
The Ring programming language version 1.7 book - Part 77 of 196
 
The Ring programming language version 1.3 book - Part 55 of 88
The Ring programming language version 1.3 book - Part 55 of 88The Ring programming language version 1.3 book - Part 55 of 88
The Ring programming language version 1.3 book - Part 55 of 88
 
The Ring programming language version 1.3 book - Part 5 of 88
The Ring programming language version 1.3 book - Part 5 of 88The Ring programming language version 1.3 book - Part 5 of 88
The Ring programming language version 1.3 book - Part 5 of 88
 
The Ring programming language version 1.5.2 book - Part 37 of 181
The Ring programming language version 1.5.2 book - Part 37 of 181The Ring programming language version 1.5.2 book - Part 37 of 181
The Ring programming language version 1.5.2 book - Part 37 of 181
 
The Ring programming language version 1.2 book - Part 53 of 84
The Ring programming language version 1.2 book - Part 53 of 84The Ring programming language version 1.2 book - Part 53 of 84
The Ring programming language version 1.2 book - Part 53 of 84
 
The Ring programming language version 1.5.3 book - Part 82 of 184
The Ring programming language version 1.5.3 book - Part 82 of 184The Ring programming language version 1.5.3 book - Part 82 of 184
The Ring programming language version 1.5.3 book - Part 82 of 184
 
The Ring programming language version 1.5.4 book - Part 38 of 185
The Ring programming language version 1.5.4 book - Part 38 of 185The Ring programming language version 1.5.4 book - Part 38 of 185
The Ring programming language version 1.5.4 book - Part 38 of 185
 
The Ring programming language version 1.5.1 book - Part 36 of 180
The Ring programming language version 1.5.1 book - Part 36 of 180The Ring programming language version 1.5.1 book - Part 36 of 180
The Ring programming language version 1.5.1 book - Part 36 of 180
 
The Ring programming language version 1.7 book - Part 78 of 196
The Ring programming language version 1.7 book - Part 78 of 196The Ring programming language version 1.7 book - Part 78 of 196
The Ring programming language version 1.7 book - Part 78 of 196
 
The Ring programming language version 1.5.2 book - Part 30 of 181
The Ring programming language version 1.5.2 book - Part 30 of 181The Ring programming language version 1.5.2 book - Part 30 of 181
The Ring programming language version 1.5.2 book - Part 30 of 181
 
The Ring programming language version 1.2 book - Part 27 of 84
The Ring programming language version 1.2 book - Part 27 of 84The Ring programming language version 1.2 book - Part 27 of 84
The Ring programming language version 1.2 book - Part 27 of 84
 
The Ring programming language version 1.2 book - Part 20 of 84
The Ring programming language version 1.2 book - Part 20 of 84The Ring programming language version 1.2 book - Part 20 of 84
The Ring programming language version 1.2 book - Part 20 of 84
 
The Ring programming language version 1.2 book - Part 78 of 84
The Ring programming language version 1.2 book - Part 78 of 84The Ring programming language version 1.2 book - Part 78 of 84
The Ring programming language version 1.2 book - Part 78 of 84
 
The Ring programming language version 1.5.4 book - Part 31 of 185
The Ring programming language version 1.5.4 book - Part 31 of 185The Ring programming language version 1.5.4 book - Part 31 of 185
The Ring programming language version 1.5.4 book - Part 31 of 185
 

More from Mahmoud Samir Fayed

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

More from Mahmoud Samir Fayed (20)

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

Recently uploaded

Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 

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

  • 1. Ring Documentation, Release 1.8 In the previous example we have the local variable name. The value of this variable will be set to “mahmoud” instead of the object attribute. Solution (1) : Just use Self func main name = "nice" o1 = new person {self.name="mahmoud" address="Egypt" phone = 000 } see o1 class person name address phone Solution (2) : Change the Local variable name func main cName = "nice" o1 = new person {name="mahmoud" address="Egypt" phone = 000 } see o1 class person name address phone Solution (3) : Change Braces and use the Dot operator func main name = "nice" o1 = new person o1.name ="mahmoud" o1.address ="Egypt" o1.phone = 000 see o1 class person name address phone 65.9 Using Braces to access objects inside Class Methods Remember that we have Three scopes (Local Scope, Object Scope and Global Scope) and when we are inside a class method, we expect that we have access to the object attributes and methods and this is true until we use braces to access another object attributes and methods because in this case our object scope will be switched to another object. new point { test() } class point x=10 y=20 func test see x + nl + y + nl # works fine myobj = new otherclass { see name + nl see x + nl + y + nl # error ! 65.9. Using Braces to access objects inside Class Methods 761
  • 2. Ring Documentation, Release 1.8 } class otherclass name = "test" Output: 10 20 test Line 8 Error (R24) : Using uninitialized variable : x In method test() in file methodbraceerror.ring called from line 5 in file methodbraceerror.ring Now what we will do to solve the previous problem? Solution (1) : Write the code that access the class attributes outside braces. new point { test() } class point x=10 y=20 func test see x + nl + y + nl # works fine myobj = new otherclass { see name + nl } see x + nl + y + nl # Outside braces - works fine class otherclass name = "test" Output: 10 20 test 10 20 Solution (2) : Don’t Use Braces new point { test() } class point x=10 y=20 func test see x + nl + y + nl myobj = new otherclass see myobj.name see x + nl + y + nl class otherclass name = "test" Solution (3) : Copy the self object We may use this solution if we want to use braces and get access to the class attributes (Just Reading). 65.9. Using Braces to access objects inside Class Methods 762
  • 3. Ring Documentation, Release 1.8 new point { test() } class point x=10 y=20 func test oSelf = self see x + nl + y + nl myobj = new otherclass { see name + nl see oself.x + nl + oself.y + nl } class otherclass name = "test" Output: 10 20 test 10 20 Now look at this line oself = self The problem with the previous line is that we will have a new copy from the object Because in Ring the assignment operator copy lists and objects by value (not by reference). When we access the new object attributes (reading) we don’t have problems But if we modified the object attributes (Then we will modify the copy!). Note: We can use braces again with the copy new point { test() } class point x=10 y=20 func test oSelf = self see x + nl + y + nl myobj = new otherclass { see name + nl oSelf { see x + nl + y + nl } } class otherclass name = "test" In a GUI application, we may create a class contains the window objects as attributes to be able to access the controls from different methods. Remember the previous information when you try to access objects using braces inside methods because in this case you can’t access the object attributes directly and if you copied the self object you will work on a copy and the new controls that you create will be related to the copy and you can’t access them. 65.9. Using Braces to access objects inside Class Methods 763
  • 4. Ring Documentation, Release 1.8 65.10 Accessing the class attributes from braces inside class meth- ods We access the class attributes directly from the class methods, also we have the choice to use the Self reference before the attribute/method name. Using Braces {} inside class method change the active object scope and prevent us from getting direct access to the class attributes. Also using Self will not help because the Self reference will be changed to the object that we access using Braces. In this case if you want to read an attribute you have to copy the Self object before using Braces and if you want to modify an attribute you have to the copy from local variable to the object attribute after using Braces. This case happens when you want to read/modify attribute insead braces. Class MyApp oCon # Attribute # some code here Func OpenDatabase # some code here new QSqlDatabase() { oCon = addDatabase("QSQLITE") { setDatabaseName("weighthistory.db") open() } } self.oCon = oCon # some code here In the previous example we want to create the connection object and save it inside the oCon attribute. The object is an output from the addDatabase() method that we use after accessing the QSQLDatabase() object. Inside braces we can’t use the Self reference to use the object created from the MyApp class, Because the Self reference here will be to the object that we access using Braces. We solved the problem in the previous example by creating a local variable called oCon then after Braces we copied that variable to the oCon attribute. The next code is another solution. Class MyApp oCon # Attribute # some code here Func OpenDatabase # some code here oCon = new QSqlDatabase() oCon = oCon.addDatabase("QSQLITE") { setDatabaseName("weighthistory.db") Open() } # some code here The next code is a better solution. 65.10. Accessing the class attributes from braces inside class methods 764
  • 5. Ring Documentation, Release 1.8 Class MyApp oCon # Attribute # some code here Func OpenDatabase # some code here new QSqlDatabase() { this.oCon = addDatabase("QSQLITE") { setDatabaseName("weighthistory.db") Open() } } # some code here Note: We used this.attribute to access the class attribute (oCon) while we are inside Braces. 65.11 Creating a Class for each Window in GUI applications A good way for creating classes for windows is to define the window directly after the class name In this area you can use nested braces without problems to define the window and the controls, and they will be attributes that you can access from methods. Example: Load "guilib.ring" new qApp { $ObjectName = "oFirstWindow" oFirstWindow = new FirstWindow $ObjectName = "oSecondWindow" oSecondWindow = new SecondWindow exec() } Class FirstWindow win = new qWidget() { setgeometry(0,50,300,200) setWindowTitle("First Window") label1 = new qLabel(win) { setgeometry(10,10,300,30) setText("0") } btn1 = new qPushButton(win) { move(100,100) setText("Increment") setClickEvent($ObjectName+".increment()") } 65.11. Creating a Class for each Window in GUI applications 765
  • 6. Ring Documentation, Release 1.8 show() } Func Increment label1 { setText( "" + ( 0 + text() + 1 ) ) } Class SecondWindow win = new qWidget() { setgeometry(400,50,300,200) setWindowTitle("Second Window") label1 = new qLabel(win) { setgeometry(10,10,300,30) setText("0") } btn1 = new qPushButton(win) { move(100,100) setText("Decrement") setClickEvent($ObjectName+".decrement()") } show() } Func Decrement label1 { setText( "" + ( 0 + text() - 1 ) ) } 65.12 Conflict between self inside braces and self in the class region In the class region (after the class name and before any methods) we define the attributes. In this region we have access to the global scope and the local scope will point to the object scope. Three Scopes • Global Scope —> Gloabl Scope • Object Scope —> Object Scope • Local Scope —> Object Scope Look at this example New Account { see aFriends } Class Account name = "Mahmoud" aFriends = [] aFriends + new Friend { name = "Gal" 65.12. Conflict between self inside braces and self in the class region 766
  • 7. Ring Documentation, Release 1.8 } aFriends + new Friend { name = "Bert" } Class Friend name Output: name: NULL name: NULL The problem in the previous example is that the Class account contains an attribute called “name” and the Friend class contains an attribue called “name” also. If you tried using self.name inside braces you will get the same result! New Account { see aFriends } Class Account name = "Mahmoud" aFriends = [] aFriends + new Friend { self.name = "Gal" } aFriends + new Friend { self.name = "Bert" } Class Friend name So why using self.name inside braces doesn’t solve this conflict? Because after the class region we have • global scope —> global scope • object scope —> object scope (Account Class) • local scope —> local scope (Account Class) When we use braces we change the object scope, so we have • global scope —> global scope • object scope —> object scope (Friend Class) • local scope —> local scope (Account Class) Ring search in the local scope first, so using self.name will use the Account class. There are many solution Solution (1) : Access the object through the list New Account { see aFriends } Class Account 65.12. Conflict between self inside braces and self in the class region 767
  • 8. Ring Documentation, Release 1.8 name = "Mahmoud" aFriends = [] aFriends + new Friend aFriends[len(aFriends)] { aFriends[len(aFriends)].name = "Gal" } aFriends + new Friend aFriends[len(aFriends)] { aFriends[len(aFriends)].name = "Bert" } Class Friend name Solution (2) : Create Method in the friend class to set the name attribute. New Account { see aFriends } Class Account name = "Mahmoud" aFriends = [] aFriends + new Friend { setname("Gal") } aFriends + new Friend { setname("Bert") } Class Friend name func setname cName name = cName Solution (3) : Create a method in the account class to set the attribute New Account { see aFriends } Class Account name = "Mahmoud" aFriends = [] friend("Gal") friend("Bert") func friend cName aFriends + new Friend { name = cName } Class Friend name Solution (4) : Declarative Programming New Account { name = "mahmoud" friend { 65.12. Conflict between self inside braces and self in the class region 768
  • 9. Ring Documentation, Release 1.8 name = "Gal" } friend { name = "Bert" } see aFriends } Class Account name aFriends = [] friend func getfriend aFriends + new Friend return aFriends[len(aFriends)] Class Friend name Output: name: Gal name: Bert 65.13 Using braces to escape from the current object scope Since braces change the current object scope to another object. we can use it to do some work without modifying the class attributes and using the same variable names. new point {x=10 y=20 z=30 start() } class point x y z func start see self # print the x y z values (10,20,30) new Local { x = 100 y = 200 z = 300 } see self # print the x y z values (10,20,30) see x + nl # will print 100 see y + nl # will print 200 see z + nl # will print 300 Self { # NO Advantage - Search is done in local scope first see x + nl # will print 100 see y + nl # will print 200 see z + nl # will print 300 } see self.x + nl # will print 10 see self.y + nl # will print 20 see self.z + nl # will print 30 class Local Output: x: 10.000000 y: 20.000000 65.13. Using braces to escape from the current object scope 769
  • 10. Ring Documentation, Release 1.8 z: 30.000000 x: 10.000000 y: 20.000000 z: 30.000000 100 200 300 100 200 300 10 20 30 65.14 The For Loops uses the local scope Starting from Ring 1.8, when the For Loop defines new identifier (variable) it will define it in the local scope. Example: x = 10 ? x # Print 10 test1() ? x # Print 10 test2() ? x # Print 10 func test1 for x = 1 to 5 next ? x # Print 6 func test2 list = 1:5 for x in list next ? x # Print NULL (The "For In" loop will kill the reference after the loop) Output: 10 6 10 NULL 10 65.15 Summary of Scope Rules At first remember that 1 - Each programming language comes with it’s scope rules based on the language goals 2 - Programming in the small is different than Programming in the Large 3 - Some programming language are designed for developing small programs while others are designed for large programs 65.14. The For Loops uses the local scope 770