SlideShare a Scribd company logo
1 of 10
Download to read offline
Ring Documentation, Release 1.5.4
• Bytes2Double()
Example:
see "Test Int2Bytes() and Bytes2Int() - Value : 77" + nl
r = Int2Bytes(77)
see "Int Size : " + len(r) + nl
see r + nl
see Bytes2Int(r) + nl
see "Test Float2Bytes() and Bytes2Float() - Value 77.12" + nl
r = Float2Bytes(77.12)
see "Float Size : " + len(r) + nl
see r + nl
see Bytes2Float(r) + nl
see "Test Double2Bytes() and Bytes2Double() - Value 9999977.12345" + nl
r = Double2Bytes(9999977.12345)
see "Double Size : " + len(r) + nl
see r + nl
decimals(5)
see Bytes2Double(r) + nl
5.7 Better StdLib
The StdLib is updated to include the next functions
• FSize()
The print() function is updated to accept local variables.
load "stdlib.ring"
func main
print("Enter your name : ") ;
Name = getString() ;
print( "Hello : #{Name} ") ;
return ;
5.8 Better WebLib
The web library is updated
• Provide better error message
1. Error (WebLib-1) : REQUEST_METHOD is empty ! - Run this script from the browser
2. Error (DataLib-1) : Can’t connect to the database server!
• Better Template() function - can accept NULL instead of object as the second paramter.
html(template("main.rhtml",NULL))
• The Form Class is updated to support the “target” attribute.
BootStrapWebPage()
{
Title = "The Ring Programming Language"
html(template("main.rhtml",NULL))
5.7. Better StdLib 85
Ring Documentation, Release 1.5.4
div {
classname = :container
div
{
id = "div3"
color = "black"
backgroundcolor = "white"
width = "100%"
form
{
method = "POST"
Action = website
Target = "codeoutput"
input { type="hidden" name="page" value=1 }
Table
{
style = stylewidth("100%") +
stylegradient(3)
TR
{
TD { align="center"
WIDTH="10%"
text("Code :")
}
TD {
html(`
<textarea name = "cCode"
rows="5"
style="width : 100%; ">
See "Hello, World!" + nl
</textarea>`)
}
}
}
Input { type = "submit"
classname="btn btn-primary btn-block"
value = "Execute" }
Table
{
style = stylewidth("100%") +
stylegradient(34)
TR
{
TD { align="center"
WIDTH="10%"
text("Output :")
}
TD {
html(`
<iframe name="codeoutput"
width="100%"
style="background-color:white;">
</iframe>`)
}
}
}
5.8. Better WebLib 86
Ring Documentation, Release 1.5.4
}
}
}
html(template("footer.rhtml",NULL))
}
5.9 Better RingQt
The next functions are added to RingQt
• SetDialogIcon(cIconFile)
• MsgInfo(cTitle,cMessage)
• ConfirmMsg(cTitle,cMessage)
• InputBox(cTitle,cMessage)
• InputBoxInt(cTitle,cMessage)
• InputBoxNum(cTitle,cMessage)
• InputBoxPass(cTitle,cMessage)
The next classes are added to RingQt
• QToolButton
• QSerialPort
• QSerialPortInfo
5.10 Qt Class Convertor
Ring 1.4 comes with a simple tool that help in porting Qt classes to RingQt.
You will nd it in ring/samples/tools/QtClassConverter
Online : https://github.com/ring-lang/ring/tree/master/samples/tools/QtClassConverter
Screen Shot:
5.9. Better RingQt 87
Ring Documentation, Release 1.5.4
5.11 What is new in Ring 1.4.1?
Ring 1.4.1 comes with the next changes
• Better Scripts for Building from Source Code
• Better Colors for the Modern Style in Ring Notepad
• Better StdLib
• Better RingQt
• New Sample : Sixteen Puzzle
The scripts are updated for building from source code.
Tested using Windows, Ubuntu Linux, Linux Mint and MacOS X.
Screen Shot:
5.11. What is new in Ring 1.4.1? 88
Ring Documentation, Release 1.5.4
In Ring Notepad - the (Modern) Style colors are updated
Screen Shot:
The StdLib is updated to include the next functions
• TrimLeft()
• TrimRight()
• TrimAll()
• EpochTime()
5.11. What is new in Ring 1.4.1? 89
Ring Documentation, Release 1.5.4
The next functions are updated to display the dialogs on the top of other windows.
• SetDialogIcon(cIconFile)
• MsgInfo(cTitle,cMessage)
• ConfirmMsg(cTitle,cMessage)
• InputBox(cTitle,cMessage)
• InputBoxInt(cTitle,cMessage)
• InputBoxNum(cTitle,cMessage)
• InputBoxPass(cTitle,cMessage)
The Sixteen Puzzle is added to the Applications folder.
Screen Shot:
5.11. What is new in Ring 1.4.1? 90
Ring Documentation, Release 1.5.4
5.11. What is new in Ring 1.4.1? 91
CHAPTER
SIX
WHAT IS NEW IN RING 1.3?
In this chapter we will learn about the changes and new features in Ring 1.3 release.
6.1 List of changes and new features
Ring 1.3 comes with many new features
• Better RingQt
• Better Ring Notepad
• Ring mode for Emacs Editor
• Better StdLib
• Better Loop/Exit Command
• New Functions
• Return Self by Reference
• Using ‘<’ and ‘:’ operators as ‘from’ keyword
• Embedding Ring in Ring without sharing the State
• RingZip Library
• Form Designer
6.2 Better RingQt
(1) Another version of QPixMap class is added (QPixMap2) which takes (int width,int height) during object init.
Example:
Load "guilib.ring"
New qapp
{
win1 = new qwidget()
{
setwindowtitle("Drawing using QPixMap")
setgeometry(100,100,500,500)
label1 = new qlabel(win1)
{
setgeometry(10,10,400,400)
settext("")
92
Ring Documentation, Release 1.5.4
}
imageStock = new qlabel(win1)
{
image = new qPixMap2(200,200)
color = new qcolor() {
setrgb(255,255,255,255)
}
pen = new qpen() {
setcolor(color)
setwidth(10)
}
new qpainter() {
begin(image)
setpen(pen)
drawline(0,0,200,200)
drawline(200,0,0,200)
endpaint()
}
setpixmap(image)
}
show()
}
exec()
}
Screen Shot:
6.2. Better RingQt 93
Ring Documentation, Release 1.5.4
2. The Objects Library is updated to include the next functions
• Last_WindowID()
• Open_WindowNoShow()
• Open_WindowAndLink()
Also the class name (WindowViewBase) is changed to (WindowsViewParent).
In The next code for example the Open_WindowAndLink() will create an object from the SecondWindowController
Class Then will add the Method SecondWindow() to the FirstWindowController Class Also will add the Method
FirstWindow() to the SecondWindowController Class
So the SendMessage() method in FirstWindowController class can use the SecondWindow() method to access the
object.
class firstwindowController from windowsControllerParent
oView = new firstwindowView
func OpenSecondWindow
Open_WindowAndLink(:SecondWindowController,self)
6.2. Better RingQt 94

More Related Content

What's hot

What's hot (20)

The Ring programming language version 1.5.1 book - Part 63 of 180
The Ring programming language version 1.5.1 book - Part 63 of 180The Ring programming language version 1.5.1 book - Part 63 of 180
The Ring programming language version 1.5.1 book - Part 63 of 180
 
The Ring programming language version 1.7 book - Part 14 of 196
The Ring programming language version 1.7 book - Part 14 of 196The Ring programming language version 1.7 book - Part 14 of 196
The Ring programming language version 1.7 book - Part 14 of 196
 
The Ring programming language version 1.6 book - Part 69 of 189
The Ring programming language version 1.6 book - Part 69 of 189The Ring programming language version 1.6 book - Part 69 of 189
The Ring programming language version 1.6 book - Part 69 of 189
 
The Ring programming language version 1.2 book - Part 49 of 84
The Ring programming language version 1.2 book - Part 49 of 84The Ring programming language version 1.2 book - Part 49 of 84
The Ring programming language version 1.2 book - Part 49 of 84
 
The Ring programming language version 1.9 book - Part 33 of 210
The Ring programming language version 1.9 book - Part 33 of 210The Ring programming language version 1.9 book - Part 33 of 210
The Ring programming language version 1.9 book - Part 33 of 210
 
The Ring programming language version 1.5.4 book - Part 67 of 185
The Ring programming language version 1.5.4 book - Part 67 of 185The Ring programming language version 1.5.4 book - Part 67 of 185
The Ring programming language version 1.5.4 book - Part 67 of 185
 
The Ring programming language version 1.4 book - Part 18 of 30
The Ring programming language version 1.4 book - Part 18 of 30The Ring programming language version 1.4 book - Part 18 of 30
The Ring programming language version 1.4 book - Part 18 of 30
 
The Ring programming language version 1.3 book - Part 50 of 88
The Ring programming language version 1.3 book - Part 50 of 88The Ring programming language version 1.3 book - Part 50 of 88
The Ring programming language version 1.3 book - Part 50 of 88
 
The Ring programming language version 1.5.4 book - Part 61 of 185
The Ring programming language version 1.5.4 book - Part 61 of 185The Ring programming language version 1.5.4 book - Part 61 of 185
The Ring programming language version 1.5.4 book - Part 61 of 185
 
The Ring programming language version 1.5.3 book - Part 7 of 184
The Ring programming language version 1.5.3 book - Part 7 of 184The Ring programming language version 1.5.3 book - Part 7 of 184
The Ring programming language version 1.5.3 book - Part 7 of 184
 
The Ring programming language version 1.8 book - Part 15 of 202
The Ring programming language version 1.8 book - Part 15 of 202The Ring programming language version 1.8 book - Part 15 of 202
The Ring programming language version 1.8 book - Part 15 of 202
 
The Ring programming language version 1.5.3 book - Part 77 of 184
The Ring programming language version 1.5.3 book - Part 77 of 184The Ring programming language version 1.5.3 book - Part 77 of 184
The Ring programming language version 1.5.3 book - Part 77 of 184
 
The Ring programming language version 1.5.2 book - Part 13 of 181
The Ring programming language version 1.5.2 book - Part 13 of 181The Ring programming language version 1.5.2 book - Part 13 of 181
The Ring programming language version 1.5.2 book - Part 13 of 181
 
The Ring programming language version 1.10 book - Part 79 of 212
The Ring programming language version 1.10 book - Part 79 of 212The Ring programming language version 1.10 book - Part 79 of 212
The Ring programming language version 1.10 book - Part 79 of 212
 
The Ring programming language version 1.4.1 book - Part 17 of 31
The Ring programming language version 1.4.1 book - Part 17 of 31The Ring programming language version 1.4.1 book - Part 17 of 31
The Ring programming language version 1.4.1 book - Part 17 of 31
 
The Ring programming language version 1.5.2 book - Part 64 of 181
The Ring programming language version 1.5.2 book - Part 64 of 181The Ring programming language version 1.5.2 book - Part 64 of 181
The Ring programming language version 1.5.2 book - Part 64 of 181
 
The Ring programming language version 1.9 book - Part 43 of 210
The Ring programming language version 1.9 book - Part 43 of 210The Ring programming language version 1.9 book - Part 43 of 210
The Ring programming language version 1.9 book - Part 43 of 210
 
The Ring programming language version 1.5.1 book - Part 175 of 180
The Ring programming language version 1.5.1 book - Part 175 of 180 The Ring programming language version 1.5.1 book - Part 175 of 180
The Ring programming language version 1.5.1 book - Part 175 of 180
 
The Ring programming language version 1.5.4 book - Part 68 of 185
The Ring programming language version 1.5.4 book - Part 68 of 185The Ring programming language version 1.5.4 book - Part 68 of 185
The Ring programming language version 1.5.4 book - Part 68 of 185
 
The Ring programming language version 1.9 book - Part 99 of 210
The Ring programming language version 1.9 book - Part 99 of 210The Ring programming language version 1.9 book - Part 99 of 210
The Ring programming language version 1.9 book - Part 99 of 210
 

Similar to The Ring programming language version 1.5.4 book - Part 12 of 185

Similar to The Ring programming language version 1.5.4 book - Part 12 of 185 (20)

The Ring programming language version 1.10 book - Part 19 of 212
The Ring programming language version 1.10 book - Part 19 of 212The Ring programming language version 1.10 book - Part 19 of 212
The Ring programming language version 1.10 book - Part 19 of 212
 
The Ring programming language version 1.8 book - Part 11 of 202
The Ring programming language version 1.8 book - Part 11 of 202The Ring programming language version 1.8 book - Part 11 of 202
The Ring programming language version 1.8 book - Part 11 of 202
 
The Ring programming language version 1.9 book - Part 13 of 210
The Ring programming language version 1.9 book - Part 13 of 210The Ring programming language version 1.9 book - Part 13 of 210
The Ring programming language version 1.9 book - Part 13 of 210
 
The Ring programming language version 1.5.2 book - Part 7 of 181
The Ring programming language version 1.5.2 book - Part 7 of 181The Ring programming language version 1.5.2 book - Part 7 of 181
The Ring programming language version 1.5.2 book - Part 7 of 181
 
The Ring programming language version 1.5.4 book - Part 13 of 185
The Ring programming language version 1.5.4 book - Part 13 of 185The Ring programming language version 1.5.4 book - Part 13 of 185
The Ring programming language version 1.5.4 book - Part 13 of 185
 
The Ring programming language version 1.5.2 book - Part 12 of 181
The Ring programming language version 1.5.2 book - Part 12 of 181The Ring programming language version 1.5.2 book - Part 12 of 181
The Ring programming language version 1.5.2 book - Part 12 of 181
 
The Ring programming language version 1.3 book - Part 7 of 88
The Ring programming language version 1.3 book - Part 7 of 88The Ring programming language version 1.3 book - Part 7 of 88
The Ring programming language version 1.3 book - Part 7 of 88
 
The Ring programming language version 1.5.1 book - Part 10 of 180
The Ring programming language version 1.5.1 book - Part 10 of 180The Ring programming language version 1.5.1 book - Part 10 of 180
The Ring programming language version 1.5.1 book - Part 10 of 180
 
The Ring programming language version 1.7 book - Part 10 of 196
The Ring programming language version 1.7 book - Part 10 of 196The Ring programming language version 1.7 book - Part 10 of 196
The Ring programming language version 1.7 book - Part 10 of 196
 
The Ring programming language version 1.5.1 book - Part 6 of 180
The Ring programming language version 1.5.1 book - Part 6 of 180The Ring programming language version 1.5.1 book - Part 6 of 180
The Ring programming language version 1.5.1 book - Part 6 of 180
 
The Ring programming language version 1.6 book - Part 14 of 189
The Ring programming language version 1.6 book - Part 14 of 189The Ring programming language version 1.6 book - Part 14 of 189
The Ring programming language version 1.6 book - Part 14 of 189
 
The Ring programming language version 1.3 book - Part 6 of 88
The Ring programming language version 1.3 book - Part 6 of 88The Ring programming language version 1.3 book - Part 6 of 88
The Ring programming language version 1.3 book - Part 6 of 88
 
The Ring programming language version 1.4 book - Part 3 of 30
The Ring programming language version 1.4 book - Part 3 of 30The Ring programming language version 1.4 book - Part 3 of 30
The Ring programming language version 1.4 book - Part 3 of 30
 
The Ring programming language version 1.5.4 book - Part 7 of 185
The Ring programming language version 1.5.4 book - Part 7 of 185The Ring programming language version 1.5.4 book - Part 7 of 185
The Ring programming language version 1.5.4 book - Part 7 of 185
 
The Ring programming language version 1.6 book - Part 9 of 189
The Ring programming language version 1.6 book - Part 9 of 189The Ring programming language version 1.6 book - Part 9 of 189
The Ring programming language version 1.6 book - Part 9 of 189
 
The Ring programming language version 1.9 book - Part 17 of 210
The Ring programming language version 1.9 book - Part 17 of 210The Ring programming language version 1.9 book - Part 17 of 210
The Ring programming language version 1.9 book - Part 17 of 210
 
The Ring programming language version 1.7 book - Part 92 of 196
The Ring programming language version 1.7 book - Part 92 of 196The Ring programming language version 1.7 book - Part 92 of 196
The Ring programming language version 1.7 book - Part 92 of 196
 
The Ring programming language version 1.6 book - Part 184 of 189
The Ring programming language version 1.6 book - Part 184 of 189The Ring programming language version 1.6 book - Part 184 of 189
The Ring programming language version 1.6 book - Part 184 of 189
 
The Ring programming language version 1.5.3 book - Part 189 of 194
The Ring programming language version 1.5.3 book - Part 189 of 194The Ring programming language version 1.5.3 book - Part 189 of 194
The Ring programming language version 1.5.3 book - Part 189 of 194
 
The Ring programming language version 1.5.3 book - Part 11 of 184
The Ring programming language version 1.5.3 book - Part 11 of 184The Ring programming language version 1.5.3 book - Part 11 of 184
The Ring programming language version 1.5.3 book - Part 11 of 184
 

More from Mahmoud 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

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

The Ring programming language version 1.5.4 book - Part 12 of 185

  • 1. Ring Documentation, Release 1.5.4 • Bytes2Double() Example: see "Test Int2Bytes() and Bytes2Int() - Value : 77" + nl r = Int2Bytes(77) see "Int Size : " + len(r) + nl see r + nl see Bytes2Int(r) + nl see "Test Float2Bytes() and Bytes2Float() - Value 77.12" + nl r = Float2Bytes(77.12) see "Float Size : " + len(r) + nl see r + nl see Bytes2Float(r) + nl see "Test Double2Bytes() and Bytes2Double() - Value 9999977.12345" + nl r = Double2Bytes(9999977.12345) see "Double Size : " + len(r) + nl see r + nl decimals(5) see Bytes2Double(r) + nl 5.7 Better StdLib The StdLib is updated to include the next functions • FSize() The print() function is updated to accept local variables. load "stdlib.ring" func main print("Enter your name : ") ; Name = getString() ; print( "Hello : #{Name} ") ; return ; 5.8 Better WebLib The web library is updated • Provide better error message 1. Error (WebLib-1) : REQUEST_METHOD is empty ! - Run this script from the browser 2. Error (DataLib-1) : Can’t connect to the database server! • Better Template() function - can accept NULL instead of object as the second paramter. html(template("main.rhtml",NULL)) • The Form Class is updated to support the “target” attribute. BootStrapWebPage() { Title = "The Ring Programming Language" html(template("main.rhtml",NULL)) 5.7. Better StdLib 85
  • 2. Ring Documentation, Release 1.5.4 div { classname = :container div { id = "div3" color = "black" backgroundcolor = "white" width = "100%" form { method = "POST" Action = website Target = "codeoutput" input { type="hidden" name="page" value=1 } Table { style = stylewidth("100%") + stylegradient(3) TR { TD { align="center" WIDTH="10%" text("Code :") } TD { html(` <textarea name = "cCode" rows="5" style="width : 100%; "> See "Hello, World!" + nl </textarea>`) } } } Input { type = "submit" classname="btn btn-primary btn-block" value = "Execute" } Table { style = stylewidth("100%") + stylegradient(34) TR { TD { align="center" WIDTH="10%" text("Output :") } TD { html(` <iframe name="codeoutput" width="100%" style="background-color:white;"> </iframe>`) } } } 5.8. Better WebLib 86
  • 3. Ring Documentation, Release 1.5.4 } } } html(template("footer.rhtml",NULL)) } 5.9 Better RingQt The next functions are added to RingQt • SetDialogIcon(cIconFile) • MsgInfo(cTitle,cMessage) • ConrmMsg(cTitle,cMessage) • InputBox(cTitle,cMessage) • InputBoxInt(cTitle,cMessage) • InputBoxNum(cTitle,cMessage) • InputBoxPass(cTitle,cMessage) The next classes are added to RingQt • QToolButton • QSerialPort • QSerialPortInfo 5.10 Qt Class Convertor Ring 1.4 comes with a simple tool that help in porting Qt classes to RingQt. You will nd it in ring/samples/tools/QtClassConverter Online : https://github.com/ring-lang/ring/tree/master/samples/tools/QtClassConverter Screen Shot: 5.9. Better RingQt 87
  • 4. Ring Documentation, Release 1.5.4 5.11 What is new in Ring 1.4.1? Ring 1.4.1 comes with the next changes • Better Scripts for Building from Source Code • Better Colors for the Modern Style in Ring Notepad • Better StdLib • Better RingQt • New Sample : Sixteen Puzzle The scripts are updated for building from source code. Tested using Windows, Ubuntu Linux, Linux Mint and MacOS X. Screen Shot: 5.11. What is new in Ring 1.4.1? 88
  • 5. Ring Documentation, Release 1.5.4 In Ring Notepad - the (Modern) Style colors are updated Screen Shot: The StdLib is updated to include the next functions • TrimLeft() • TrimRight() • TrimAll() • EpochTime() 5.11. What is new in Ring 1.4.1? 89
  • 6. Ring Documentation, Release 1.5.4 The next functions are updated to display the dialogs on the top of other windows. • SetDialogIcon(cIconFile) • MsgInfo(cTitle,cMessage) • ConrmMsg(cTitle,cMessage) • InputBox(cTitle,cMessage) • InputBoxInt(cTitle,cMessage) • InputBoxNum(cTitle,cMessage) • InputBoxPass(cTitle,cMessage) The Sixteen Puzzle is added to the Applications folder. Screen Shot: 5.11. What is new in Ring 1.4.1? 90
  • 7. Ring Documentation, Release 1.5.4 5.11. What is new in Ring 1.4.1? 91
  • 8. CHAPTER SIX WHAT IS NEW IN RING 1.3? In this chapter we will learn about the changes and new features in Ring 1.3 release. 6.1 List of changes and new features Ring 1.3 comes with many new features • Better RingQt • Better Ring Notepad • Ring mode for Emacs Editor • Better StdLib • Better Loop/Exit Command • New Functions • Return Self by Reference • Using ‘<’ and ‘:’ operators as ‘from’ keyword • Embedding Ring in Ring without sharing the State • RingZip Library • Form Designer 6.2 Better RingQt (1) Another version of QPixMap class is added (QPixMap2) which takes (int width,int height) during object init. Example: Load "guilib.ring" New qapp { win1 = new qwidget() { setwindowtitle("Drawing using QPixMap") setgeometry(100,100,500,500) label1 = new qlabel(win1) { setgeometry(10,10,400,400) settext("") 92
  • 9. Ring Documentation, Release 1.5.4 } imageStock = new qlabel(win1) { image = new qPixMap2(200,200) color = new qcolor() { setrgb(255,255,255,255) } pen = new qpen() { setcolor(color) setwidth(10) } new qpainter() { begin(image) setpen(pen) drawline(0,0,200,200) drawline(200,0,0,200) endpaint() } setpixmap(image) } show() } exec() } Screen Shot: 6.2. Better RingQt 93
  • 10. Ring Documentation, Release 1.5.4 2. The Objects Library is updated to include the next functions • Last_WindowID() • Open_WindowNoShow() • Open_WindowAndLink() Also the class name (WindowViewBase) is changed to (WindowsViewParent). In The next code for example the Open_WindowAndLink() will create an object from the SecondWindowController Class Then will add the Method SecondWindow() to the FirstWindowController Class Also will add the Method FirstWindow() to the SecondWindowController Class So the SendMessage() method in FirstWindowController class can use the SecondWindow() method to access the object. class firstwindowController from windowsControllerParent oView = new firstwindowView func OpenSecondWindow Open_WindowAndLink(:SecondWindowController,self) 6.2. Better RingQt 94