SlideShare ist ein Scribd-Unternehmen logo
1 von 10
Downloaden Sie, um offline zu lesen
Ring Documentation, Release 1.10
* :
* : <tuHighValue>
* : Specifies the higher value in the range.
* :
* Returns : <luReturnValue>
* : Returns a logical oder null value.
91.40 frSetSeparatorTo() function
* Syntax : frSetSeparatorTo(tuExpression)
* Description : Specifies the character for the numeric place separator.
* :
* Arguments : <tuExpression>
* : Specifies the character for the numeric place separator.
* :
* : Use frSetSeparatorTo() to change the numeric place
* : separator from de default, for example space " " or a comma ",".
* : Issue frSetSeparatorTo(Null) to reset the value to its default.
* :
* Returns : None
91.41 frTransform() function
* Syntax : tcReturnValue = frTransform(tuExpression, tcFormatCodes)
* Description : Returns a character string from an expression in a
* : format determined by a format code.
* Arguments : <tuExpression>
* : Specifies the expression to format.
* :
* : <tcFormatCodes>
* : Specifies one or more format codes that determine how to
* : format the expression.
* :
* Returns : <tcReturnValue>
The following table lists the available format codes for tcFormatCodes.
--------------------------------------------------------------------------
Format Code Description
--------------------------------------------------------------------------
@! Converts an entire character string to uppercase.
@T Trims leading and trailing spaces from character values.
@B Left-justifies Numeric data within the display region.
@L Pads numeric and string data with leading zeros.
@C Appends CR to positive numeric values to indicate a credit.
@X Appends DB to negative numeric values to indicate a debit.
--------------------------------------------------------------------------
91.42 frVarType() function
91.40. frSetSeparatorTo() function 1228
Ring Documentation, Release 1.10
* Syntax : lcRet = frVarType(tuExpression)
* Description : Returns the data type of an expression.
* :
* Arguments : <tuExpression>
* : Expecifies the expression for which the data type is returned.
* : frVartype() returns a
* : single character indicating the data type of the expression.
* : The following table lists the characteres that frVarType()
* : returns for each data type.
* :
* : ------------------- -------------------------------------
* : Return Value Data Type
* : ------------------- -------------------------------------
* : C Character
* : N Numeric
* : A List
* : O Object
* : U Undefined type
* : ------------------- -------------------------------------
* :
* Returns : Character
91.43 Example
Load "foxring.ring"
mf = new frFunctions
/*----------------------------------------------------------*/
* frProper() samples
/*----------------------------------------------------------*/
lcStr1 = "ring is a good language"
?mf.frProper(lcStr1)
?mf.frProper(Upper(lcStr1))
/*----------------------------------------------------------*/
* frStuff() samples
/*----------------------------------------------------------*/
lcStr1 = "abcdefghijklm"
lcStr2 = "12345"
// insert
?mf.frStuff(lcStr1, 4, 0, lcStr2)
// replace
?mf.frStuff(lcStr1, 4, 3, lcStr2)
// delete
?mf.frStuff(lcStr1, 4, 6, "")
// replace and insert
?mf.frStuff(lcStr1, 4, 1, lcStr2)
// replace and delete
?mf.frStuff(lcStr1, 4, 4, lcStr2)
// replace, delete rest
91.43. Example 1229
Ring Documentation, Release 1.10
?mf.frStuff(lcStr1, 4, Len(lcStr1), lcStr2)
/*----------------------------------------------------------*/
?mf.frAbs(-45)
?mf.frAbs(10-30)
?mf.frAbs(30-10)
lcNumber1 = 40
lcNumber2 = 2
?mf.frAbs(lcNumber2-lcNumber1)
lcCompletFileName = "C:ringdocssourcecontribute.txt"
?mf.frFile(lcCompletFileName, Null)
if mf.frFile(lcCompletFileName, Null) {
?mf.frFileToStr(lcCompletFileName)
else
?"File does not exist"
}
lcNewPath = "C:ring_2docssource"
?mf.frJustExt(lcCompletFileName)
?mf.frJustDrive(lcCompletFileName)
?mf.frJustStem(lcCompletFileName)
?mf.frForcePath(lcCompletFileName, lcNewPath)
?mf.frTransform(" Ring is a good language ",
"@! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
?mf.frAllTrim(" Ring is a good language ", Null)
?mf._version
lnValue = 3125.54
?mf.frTransform(lnValue, "@B")+ "Euros"
?mf.frTransform(lnValue, "@C 9999,999,999,999.999")
mf.frSetSeparatorTo(" ")
?mf.frTransform(lnValue, "9999,999,999,999.999")
?mf.frInt(lnValue)
?mf.frForceExt("teste", "dbf")
// Format "@L" Added into frTransform() function
?mf.frTransform("123", "@L 999999")
?mf.frTransform(123, "@L 999999")
91.43. Example 1230
CHAPTER
NINETYTWO
BIGNUMBER LIBRARY
In this chapter we will learn about using the Big Number library in the Ring programming language.
Developers : Bert Mariani, Gal Zsolt (~ CalmoSoft ~)
92.1 Loading the library
Before using the next function load the bignumber.ring library
load "bignumber.ring"
# Use Big Number library functions
92.2 Examples
Using the BigNumber library we can do arithmetic operations on huge numbers.
Example:
load "bignumber.ring"
num1 = "62345678901234567891678345123456789" ### Big
num2 = "1237894567890123419871236545" ### Small
num3 = "64" ### Divide Small
num4 = "765432"
num5 = "3" ### Power
? "Add big numbers:"
a1 = new BigNumber(num1) a1.Print()
a2 = new BigNumber(num2) a2.Print()
a3 = a1 + a2 a3.Print() ? nl
? "Substract big numbers:"
a1 = new BigNumber(num1) a1.Print()
a2 = new BigNumber(num2) a2.Print()
a3 = a1 - a2 a3.Print() ? nl
? "Multiply big numbers:"
a1 = new BigNumber(num1) a1.print()
a2 = new BigNumber(num2) a2.print()
a3 = a1 * a2 a3.print() ? nl
? "Divide big numbers:"
1231
Ring Documentation, Release 1.10
a1 = new BigNumber(num1) a1.print()
a2 = new BigNumber(num2) a2.print()
a3 = a1 / a2 a3.print() ? nl
? "Divide big numbers: by very small number"
a1 = new BigNumber(num1) a1.print()
a2 = new BigNumber(num3) a2.print()
a3 = a1 / a2 a3.print() ? nl
? "Power of big number:"
a1 = new BigNumber(num1) a1.print()
a2 = new BigNumber(num5) a2.print()
a3 = a1 ^ a2 a3.print() ? nl
Output:
Add big numbers:
62345678901234567891678345123456789
1237894567890123419871236545
62345680139129135781801764994693334
Substract big numbers:
62345678901234567891678345123456789
1237894567890123419871236545
52345687663340000001554925252220244
Multiply big numbers:
62345678901234567891678345123456789
1237894567890123419871236545
77177377243260150103462178714197454736432472780119682305154005
Divide big numbers:
62345678901234567891678345123456789
1237894567890123419871236545
50364288
Divide big numbers: by very small number
62345678901234567891678345123456789
64
974151232831790123307474142554012
Power of big number:
62345678901234567891678345123456789
3
242336636261471172092347146031727004 (Output continue in next line)
371698195628343934238988256152289508 (Output continue in next line)
493964611043228971692389860897069
92.3 BigNumber Functions
The library contains the next functions
92.3. BigNumber Functions 1232
Ring Documentation, Release 1.10
FuncAdd(num1,num2)
FuncSubtract(num1,num2)
FuncCompare(num1,num2)
FuncDivide(num1,num2)
FuncMultiply(num1,num2)
FuncPower(num1,num2)
FuncBinaryToDecimal(num1)
FuncDecimalToBinary(num1)
printBinaryDigits(binList)
printDecimalDigits(decList)
92.4 BigNumber Class
The library contains the next class
class BigNumber
func init aPara
func operator cOperator, Para
func print
func value
92.5 Library Source Code
You can see the library source code in : ring/ringlibs/bignumber folder
Source Code : https://github.com/ring-lang/ring/blob/master/ringlibs/bignumber/bignumber.ring
92.4. BigNumber Class 1233
CHAPTER
NINETYTHREE
RINGLIBCURL FUNCTIONS REFERENCE
• CURLOPT_VERBOSE
• CURLOPT_HEADER
• CURLOPT_NOPROGRESS
• CURLOPT_NOSIGNAL
• CURLOPT_WILDCARDMATCH
• CURLOPT_WRITEFUNCTION
• CURLOPT_WRITEDATA
• CURLOPT_READFUNCTION
• CURLOPT_READDATA
• CURLOPT_IOCTLFUNCTION
• CURLOPT_IOCTLDATA
• CURLOPT_SEEKFUNCTION
• CURLOPT_SEEKDATA
• CURLOPT_SOCKOPTFUNCTION
• CURLOPT_SOCKOPTDATA
• CURLOPT_OPENSOCKETFUNCTION
• CURLOPT_OPENSOCKETDATA
• CURLOPT_CLOSESOCKETFUNCTION
• CURLOPT_CLOSESOCKETDATA
• CURLOPT_PROGRESSFUNCTION
• CURLOPT_PROGRESSDATA
• CURLOPT_HEADERFUNCTION
• CURLOPT_HEADERDATA
• CURLOPT_DEBUGFUNCTION
• CURLOPT_DEBUGDATA
• CURLOPT_SSL_CTX_FUNCTION
• CURLOPT_SSL_CTX_DATA
1234
Ring Documentation, Release 1.10
• CURLOPT_CONV_TO_NETWORK_FUNCTION
• CURLOPT_CONV_FROM_NETWORK_FUNCTION
• CURLOPT_CONV_FROM_UTF8_FUNCTION
• CURLOPT_INTERLEAVEFUNCTION
• CURLOPT_INTERLEAVEDATA
• CURLOPT_CHUNK_BGN_FUNCTION
• CURLOPT_CHUNK_END_FUNCTION
• CURLOPT_CHUNK_DATA
• CURLOPT_FNMATCH_FUNCTION
• CURLOPT_FNMATCH_DATA
• CURLOPT_ERRORBUFFER
• CURLOPT_STDERR
• CURLOPT_FAILONERROR
• CURLOPT_URL
• CURLOPT_PROTOCOLS
• CURLOPT_REDIR_PROTOCOLS
• CURLOPT_PROXY
• CURLOPT_PROXYPORT
• CURLOPT_PROXYTYPE
• CURLOPT_NOPROXY
• CURLOPT_HTTPPROXYTUNNEL
• CURLOPT_SOCKS5_GSSAPI_SERVICE
• CURLOPT_SOCKS5_GSSAPI_NEC
• CURLOPT_INTERFACE
• CURLOPT_LOCALPORT
• CURLOPT_LOCALPORTRANGE
• CURLOPT_DNS_CACHE_TIMEOUT
• CURLOPT_DNS_USE_GLOBAL_CACHE
• CURLOPT_BUFFERSIZE
• CURLOPT_PORT
• CURLOPT_TCP_NODELAY
• CURLOPT_ADDRESS_SCOPE
• CURLOPT_NETRC
• CURLOPT_NETRC_FILE
• CURLOPT_USERPWD
• CURLOPT_PROXYUSERPWD
1235
Ring Documentation, Release 1.10
• CURLOPT_USERNAME
• CURLOPT_PASSWORD
• CURLOPT_PROXYUSERNAME
• CURLOPT_PROXYPASSWORD
• CURLOPT_HTTPAUTH
• CURLOPT_TLSAUTH_USERNAME
• CURLOPT_TLSAUTH_PASSWORD
• CURLOPT_TLSAUTH_TYPE
• CURLOPT_PROXYAUTH
• CURLOPT_AUTOREFERER
• CURLOPT_ACCEPT_ENCODING
• CURLOPT_TRANSFER_ENCODING
• CURLOPT_FOLLOWLOCATION
• CURLOPT_UNRESTRICTED_AUTH
• CURLOPT_MAXREDIRS
• CURLOPT_POSTREDIR
• CURLOPT_PUT
• CURLOPT_POST
• CURLOPT_POSTFIELDS
• CURLOPT_POSTFIELDSIZE
• CURLOPT_POSTFIELDSIZE_LARGE
• CURLOPT_COPYPOSTFIELDS
• CURLOPT_HTTPPOST
• CURLOPT_REFERER
• CURLOPT_USERAGENT
• CURLOPT_HTTPHEADER
• CURLOPT_HTTP200ALIASES
• CURLOPT_COOKIE
• CURLOPT_COOKIEFILE
• CURLOPT_COOKIEJAR
• CURLOPT_COOKIESESSION
• CURLOPT_COOKIELIST
• CURLOPT_HTTPGET
• CURLOPT_HTTP_VERSION
• CURLOPT_IGNORE_CONTENT_LENGTH
• CURLOPT_HTTP_CONTENT_DECODING
1236
Ring Documentation, Release 1.10
• CURLOPT_HTTP_TRANSFER_DECODING
• CURLOPT_MAIL_FROM
• CURLOPT_MAIL_RCPT
• CURLOPT_TFTP_BLKSIZE
• CURLOPT_FTPPORT
• CURLOPT_QUOTE
• CURLOPT_POSTQUOTE
• CURLOPT_PREQUOTE
• CURLOPT_APPEND
• CURLOPT_FTP_USE_EPRT
• CURLOPT_FTP_USE_EPSV
• CURLOPT_FTP_USE_PRET
• CURLOPT_FTP_CREATE_MISSING_DIRS
• CURLOPT_FTP_RESPONSE_TIMEOUT
• CURLOPT_FTP_ALTERNATIVE_TO_USER
• CURLOPT_FTP_SKIP_PASV_IP
• CURLOPT_FTPSSLAUTH
• CURLOPT_FTP_SSL_CCC
• CURLOPT_FTP_ACCOUNT
• CURLOPT_FTP_FILEMETHOD
• CURLOPT_RTSP_REQUEST
• CURLOPT_RTSP_SESSION_ID
• CURLOPT_RTSP_STREAM_URI
• CURLOPT_RTSP_TRANSPORT
• CURLOPT_RTSP_CLIENT_CSEQ
• CURLOPT_RTSP_SERVER_CSEQ
• CURLOPT_TRANSFERTEXT
• CURLOPT_PROXY_TRANSFER_MODE
• CURLOPT_CRLF
• CURLOPT_RANGE
• CURLOPT_RESUME_FROM
• CURLOPT_RESUME_FROM_LARGE
• CURLOPT_CUSTOMREQUEST
• CURLOPT_FILETIME
• CURLOPT_DIRLISTONLY
• CURLOPT_NOBODY
1237

Weitere ähnliche Inhalte

Was ist angesagt?

Intro to tsql unit 10
Intro to tsql   unit 10Intro to tsql   unit 10
Intro to tsql unit 10
Syed Asrarali
 
Introduction to Monads in Scala (1)
Introduction to Monads in Scala (1)Introduction to Monads in Scala (1)
Introduction to Monads in Scala (1)
stasimus
 
Introduction to Monads in Scala (2)
Introduction to Monads in Scala (2)Introduction to Monads in Scala (2)
Introduction to Monads in Scala (2)
stasimus
 
Lec2&3 data structure
Lec2&3 data structureLec2&3 data structure
Lec2&3 data structure
Saad Gabr
 

Was ist angesagt? (20)

Intro to tsql unit 10
Intro to tsql   unit 10Intro to tsql   unit 10
Intro to tsql unit 10
 
From java to kotlin beyond alt+shift+cmd+k - Droidcon italy
From java to kotlin beyond alt+shift+cmd+k - Droidcon italyFrom java to kotlin beyond alt+shift+cmd+k - Droidcon italy
From java to kotlin beyond alt+shift+cmd+k - Droidcon italy
 
Introduction to Monads in Scala (1)
Introduction to Monads in Scala (1)Introduction to Monads in Scala (1)
Introduction to Monads in Scala (1)
 
The Ring programming language version 1.10 book - Part 31 of 212
The Ring programming language version 1.10 book - Part 31 of 212The Ring programming language version 1.10 book - Part 31 of 212
The Ring programming language version 1.10 book - Part 31 of 212
 
PDBC
PDBCPDBC
PDBC
 
The Ring programming language version 1.8 book - Part 94 of 202
The Ring programming language version 1.8 book - Part 94 of 202The Ring programming language version 1.8 book - Part 94 of 202
The Ring programming language version 1.8 book - Part 94 of 202
 
Introduction to Monads in Scala (2)
Introduction to Monads in Scala (2)Introduction to Monads in Scala (2)
Introduction to Monads in Scala (2)
 
The Ring programming language version 1.5.4 book - Part 23 of 185
The Ring programming language version 1.5.4 book - Part 23 of 185The Ring programming language version 1.5.4 book - Part 23 of 185
The Ring programming language version 1.5.4 book - Part 23 of 185
 
5. R basics
5. R basics5. R basics
5. R basics
 
Lecture 2 f17
Lecture 2 f17Lecture 2 f17
Lecture 2 f17
 
Network security CS6
Network security   CS6Network security   CS6
Network security CS6
 
Functions
FunctionsFunctions
Functions
 
R Programming: Numeric Functions In R
R Programming: Numeric Functions In RR Programming: Numeric Functions In R
R Programming: Numeric Functions In R
 
Lec2&3 data structure
Lec2&3 data structureLec2&3 data structure
Lec2&3 data structure
 
Lec2&3_DataStructure
Lec2&3_DataStructureLec2&3_DataStructure
Lec2&3_DataStructure
 
Lec2
Lec2Lec2
Lec2
 
The Ring programming language version 1.3 book - Part 14 of 88
The Ring programming language version 1.3 book - Part 14 of 88The Ring programming language version 1.3 book - Part 14 of 88
The Ring programming language version 1.3 book - Part 14 of 88
 
Unit 2
Unit 2Unit 2
Unit 2
 
Sparklyr
SparklyrSparklyr
Sparklyr
 
Numpy tutorial(final) 20160303
Numpy tutorial(final) 20160303Numpy tutorial(final) 20160303
Numpy tutorial(final) 20160303
 

Ähnlich wie The Ring programming language version 1.10 book - Part 127 of 212

C++ lectures all chapters in one slide.pptx
C++ lectures all chapters in one slide.pptxC++ lectures all chapters in one slide.pptx
C++ lectures all chapters in one slide.pptx
ssuser3cbb4c
 
2.overview of c++ ________lecture2
2.overview of c++  ________lecture22.overview of c++  ________lecture2
2.overview of c++ ________lecture2
Warui Maina
 
Router Queue Simulation in C++ in MMNN and MM1 conditions
Router Queue Simulation in C++ in MMNN and MM1 conditionsRouter Queue Simulation in C++ in MMNN and MM1 conditions
Router Queue Simulation in C++ in MMNN and MM1 conditions
Morteza Mahdilar
 

Ähnlich wie The Ring programming language version 1.10 book - Part 127 of 212 (20)

Ch3
Ch3Ch3
Ch3
 
Lecture 9_Classes.pptx
Lecture 9_Classes.pptxLecture 9_Classes.pptx
Lecture 9_Classes.pptx
 
C++ lectures all chapters in one slide.pptx
C++ lectures all chapters in one slide.pptxC++ lectures all chapters in one slide.pptx
C++ lectures all chapters in one slide.pptx
 
Lecture#6 functions in c++
Lecture#6 functions in c++Lecture#6 functions in c++
Lecture#6 functions in c++
 
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo JobyC++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
 
Cc code cards
Cc code cardsCc code cards
Cc code cards
 
CPP Homework Help
CPP Homework HelpCPP Homework Help
CPP Homework Help
 
2.overview of c++ ________lecture2
2.overview of c++  ________lecture22.overview of c++  ________lecture2
2.overview of c++ ________lecture2
 
Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2
Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2
Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Best C++ Programming Homework Help
Best C++ Programming Homework HelpBest C++ Programming Homework Help
Best C++ Programming Homework Help
 
The Ring programming language version 1.5.3 book - Part 91 of 184
The Ring programming language version 1.5.3 book - Part 91 of 184The Ring programming language version 1.5.3 book - Part 91 of 184
The Ring programming language version 1.5.3 book - Part 91 of 184
 
B61301007 matlab documentation
B61301007 matlab documentationB61301007 matlab documentation
B61301007 matlab documentation
 
C PROGRAMS - SARASWATHI RAMALINGAM
C PROGRAMS - SARASWATHI RAMALINGAMC PROGRAMS - SARASWATHI RAMALINGAM
C PROGRAMS - SARASWATHI RAMALINGAM
 
The Ring programming language version 1.7 book - Part 87 of 196
The Ring programming language version 1.7 book - Part 87 of 196The Ring programming language version 1.7 book - Part 87 of 196
The Ring programming language version 1.7 book - Part 87 of 196
 
Hive function-cheat-sheet
Hive function-cheat-sheetHive function-cheat-sheet
Hive function-cheat-sheet
 
Functions
FunctionsFunctions
Functions
 
Python lambda functions with filter, map & reduce function
Python lambda functions with filter, map & reduce functionPython lambda functions with filter, map & reduce function
Python lambda functions with filter, map & reduce function
 
Router Queue Simulation in C++ in MMNN and MM1 conditions
Router Queue Simulation in C++ in MMNN and MM1 conditionsRouter Queue Simulation in C++ in MMNN and MM1 conditions
Router Queue Simulation in C++ in MMNN and MM1 conditions
 
The Ring programming language version 1.6 book - Part 25 of 189
The Ring programming language version 1.6 book - Part 25 of 189The Ring programming language version 1.6 book - Part 25 of 189
The Ring programming language version 1.6 book - Part 25 of 189
 

Mehr von Mahmoud Samir Fayed

Mehr von 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
 

Kürzlich hochgeladen

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Kürzlich hochgeladen (20)

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 

The Ring programming language version 1.10 book - Part 127 of 212

  • 1. Ring Documentation, Release 1.10 * : * : <tuHighValue> * : Specifies the higher value in the range. * : * Returns : <luReturnValue> * : Returns a logical oder null value. 91.40 frSetSeparatorTo() function * Syntax : frSetSeparatorTo(tuExpression) * Description : Specifies the character for the numeric place separator. * : * Arguments : <tuExpression> * : Specifies the character for the numeric place separator. * : * : Use frSetSeparatorTo() to change the numeric place * : separator from de default, for example space " " or a comma ",". * : Issue frSetSeparatorTo(Null) to reset the value to its default. * : * Returns : None 91.41 frTransform() function * Syntax : tcReturnValue = frTransform(tuExpression, tcFormatCodes) * Description : Returns a character string from an expression in a * : format determined by a format code. * Arguments : <tuExpression> * : Specifies the expression to format. * : * : <tcFormatCodes> * : Specifies one or more format codes that determine how to * : format the expression. * : * Returns : <tcReturnValue> The following table lists the available format codes for tcFormatCodes. -------------------------------------------------------------------------- Format Code Description -------------------------------------------------------------------------- @! Converts an entire character string to uppercase. @T Trims leading and trailing spaces from character values. @B Left-justifies Numeric data within the display region. @L Pads numeric and string data with leading zeros. @C Appends CR to positive numeric values to indicate a credit. @X Appends DB to negative numeric values to indicate a debit. -------------------------------------------------------------------------- 91.42 frVarType() function 91.40. frSetSeparatorTo() function 1228
  • 2. Ring Documentation, Release 1.10 * Syntax : lcRet = frVarType(tuExpression) * Description : Returns the data type of an expression. * : * Arguments : <tuExpression> * : Expecifies the expression for which the data type is returned. * : frVartype() returns a * : single character indicating the data type of the expression. * : The following table lists the characteres that frVarType() * : returns for each data type. * : * : ------------------- ------------------------------------- * : Return Value Data Type * : ------------------- ------------------------------------- * : C Character * : N Numeric * : A List * : O Object * : U Undefined type * : ------------------- ------------------------------------- * : * Returns : Character 91.43 Example Load "foxring.ring" mf = new frFunctions /*----------------------------------------------------------*/ * frProper() samples /*----------------------------------------------------------*/ lcStr1 = "ring is a good language" ?mf.frProper(lcStr1) ?mf.frProper(Upper(lcStr1)) /*----------------------------------------------------------*/ * frStuff() samples /*----------------------------------------------------------*/ lcStr1 = "abcdefghijklm" lcStr2 = "12345" // insert ?mf.frStuff(lcStr1, 4, 0, lcStr2) // replace ?mf.frStuff(lcStr1, 4, 3, lcStr2) // delete ?mf.frStuff(lcStr1, 4, 6, "") // replace and insert ?mf.frStuff(lcStr1, 4, 1, lcStr2) // replace and delete ?mf.frStuff(lcStr1, 4, 4, lcStr2) // replace, delete rest 91.43. Example 1229
  • 3. Ring Documentation, Release 1.10 ?mf.frStuff(lcStr1, 4, Len(lcStr1), lcStr2) /*----------------------------------------------------------*/ ?mf.frAbs(-45) ?mf.frAbs(10-30) ?mf.frAbs(30-10) lcNumber1 = 40 lcNumber2 = 2 ?mf.frAbs(lcNumber2-lcNumber1) lcCompletFileName = "C:ringdocssourcecontribute.txt" ?mf.frFile(lcCompletFileName, Null) if mf.frFile(lcCompletFileName, Null) { ?mf.frFileToStr(lcCompletFileName) else ?"File does not exist" } lcNewPath = "C:ring_2docssource" ?mf.frJustExt(lcCompletFileName) ?mf.frJustDrive(lcCompletFileName) ?mf.frJustStem(lcCompletFileName) ?mf.frForcePath(lcCompletFileName, lcNewPath) ?mf.frTransform(" Ring is a good language ", "@! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!") ?mf.frAllTrim(" Ring is a good language ", Null) ?mf._version lnValue = 3125.54 ?mf.frTransform(lnValue, "@B")+ "Euros" ?mf.frTransform(lnValue, "@C 9999,999,999,999.999") mf.frSetSeparatorTo(" ") ?mf.frTransform(lnValue, "9999,999,999,999.999") ?mf.frInt(lnValue) ?mf.frForceExt("teste", "dbf") // Format "@L" Added into frTransform() function ?mf.frTransform("123", "@L 999999") ?mf.frTransform(123, "@L 999999") 91.43. Example 1230
  • 4. CHAPTER NINETYTWO BIGNUMBER LIBRARY In this chapter we will learn about using the Big Number library in the Ring programming language. Developers : Bert Mariani, Gal Zsolt (~ CalmoSoft ~) 92.1 Loading the library Before using the next function load the bignumber.ring library load "bignumber.ring" # Use Big Number library functions 92.2 Examples Using the BigNumber library we can do arithmetic operations on huge numbers. Example: load "bignumber.ring" num1 = "62345678901234567891678345123456789" ### Big num2 = "1237894567890123419871236545" ### Small num3 = "64" ### Divide Small num4 = "765432" num5 = "3" ### Power ? "Add big numbers:" a1 = new BigNumber(num1) a1.Print() a2 = new BigNumber(num2) a2.Print() a3 = a1 + a2 a3.Print() ? nl ? "Substract big numbers:" a1 = new BigNumber(num1) a1.Print() a2 = new BigNumber(num2) a2.Print() a3 = a1 - a2 a3.Print() ? nl ? "Multiply big numbers:" a1 = new BigNumber(num1) a1.print() a2 = new BigNumber(num2) a2.print() a3 = a1 * a2 a3.print() ? nl ? "Divide big numbers:" 1231
  • 5. Ring Documentation, Release 1.10 a1 = new BigNumber(num1) a1.print() a2 = new BigNumber(num2) a2.print() a3 = a1 / a2 a3.print() ? nl ? "Divide big numbers: by very small number" a1 = new BigNumber(num1) a1.print() a2 = new BigNumber(num3) a2.print() a3 = a1 / a2 a3.print() ? nl ? "Power of big number:" a1 = new BigNumber(num1) a1.print() a2 = new BigNumber(num5) a2.print() a3 = a1 ^ a2 a3.print() ? nl Output: Add big numbers: 62345678901234567891678345123456789 1237894567890123419871236545 62345680139129135781801764994693334 Substract big numbers: 62345678901234567891678345123456789 1237894567890123419871236545 52345687663340000001554925252220244 Multiply big numbers: 62345678901234567891678345123456789 1237894567890123419871236545 77177377243260150103462178714197454736432472780119682305154005 Divide big numbers: 62345678901234567891678345123456789 1237894567890123419871236545 50364288 Divide big numbers: by very small number 62345678901234567891678345123456789 64 974151232831790123307474142554012 Power of big number: 62345678901234567891678345123456789 3 242336636261471172092347146031727004 (Output continue in next line) 371698195628343934238988256152289508 (Output continue in next line) 493964611043228971692389860897069 92.3 BigNumber Functions The library contains the next functions 92.3. BigNumber Functions 1232
  • 6. Ring Documentation, Release 1.10 FuncAdd(num1,num2) FuncSubtract(num1,num2) FuncCompare(num1,num2) FuncDivide(num1,num2) FuncMultiply(num1,num2) FuncPower(num1,num2) FuncBinaryToDecimal(num1) FuncDecimalToBinary(num1) printBinaryDigits(binList) printDecimalDigits(decList) 92.4 BigNumber Class The library contains the next class class BigNumber func init aPara func operator cOperator, Para func print func value 92.5 Library Source Code You can see the library source code in : ring/ringlibs/bignumber folder Source Code : https://github.com/ring-lang/ring/blob/master/ringlibs/bignumber/bignumber.ring 92.4. BigNumber Class 1233
  • 7. CHAPTER NINETYTHREE RINGLIBCURL FUNCTIONS REFERENCE • CURLOPT_VERBOSE • CURLOPT_HEADER • CURLOPT_NOPROGRESS • CURLOPT_NOSIGNAL • CURLOPT_WILDCARDMATCH • CURLOPT_WRITEFUNCTION • CURLOPT_WRITEDATA • CURLOPT_READFUNCTION • CURLOPT_READDATA • CURLOPT_IOCTLFUNCTION • CURLOPT_IOCTLDATA • CURLOPT_SEEKFUNCTION • CURLOPT_SEEKDATA • CURLOPT_SOCKOPTFUNCTION • CURLOPT_SOCKOPTDATA • CURLOPT_OPENSOCKETFUNCTION • CURLOPT_OPENSOCKETDATA • CURLOPT_CLOSESOCKETFUNCTION • CURLOPT_CLOSESOCKETDATA • CURLOPT_PROGRESSFUNCTION • CURLOPT_PROGRESSDATA • CURLOPT_HEADERFUNCTION • CURLOPT_HEADERDATA • CURLOPT_DEBUGFUNCTION • CURLOPT_DEBUGDATA • CURLOPT_SSL_CTX_FUNCTION • CURLOPT_SSL_CTX_DATA 1234
  • 8. Ring Documentation, Release 1.10 • CURLOPT_CONV_TO_NETWORK_FUNCTION • CURLOPT_CONV_FROM_NETWORK_FUNCTION • CURLOPT_CONV_FROM_UTF8_FUNCTION • CURLOPT_INTERLEAVEFUNCTION • CURLOPT_INTERLEAVEDATA • CURLOPT_CHUNK_BGN_FUNCTION • CURLOPT_CHUNK_END_FUNCTION • CURLOPT_CHUNK_DATA • CURLOPT_FNMATCH_FUNCTION • CURLOPT_FNMATCH_DATA • CURLOPT_ERRORBUFFER • CURLOPT_STDERR • CURLOPT_FAILONERROR • CURLOPT_URL • CURLOPT_PROTOCOLS • CURLOPT_REDIR_PROTOCOLS • CURLOPT_PROXY • CURLOPT_PROXYPORT • CURLOPT_PROXYTYPE • CURLOPT_NOPROXY • CURLOPT_HTTPPROXYTUNNEL • CURLOPT_SOCKS5_GSSAPI_SERVICE • CURLOPT_SOCKS5_GSSAPI_NEC • CURLOPT_INTERFACE • CURLOPT_LOCALPORT • CURLOPT_LOCALPORTRANGE • CURLOPT_DNS_CACHE_TIMEOUT • CURLOPT_DNS_USE_GLOBAL_CACHE • CURLOPT_BUFFERSIZE • CURLOPT_PORT • CURLOPT_TCP_NODELAY • CURLOPT_ADDRESS_SCOPE • CURLOPT_NETRC • CURLOPT_NETRC_FILE • CURLOPT_USERPWD • CURLOPT_PROXYUSERPWD 1235
  • 9. Ring Documentation, Release 1.10 • CURLOPT_USERNAME • CURLOPT_PASSWORD • CURLOPT_PROXYUSERNAME • CURLOPT_PROXYPASSWORD • CURLOPT_HTTPAUTH • CURLOPT_TLSAUTH_USERNAME • CURLOPT_TLSAUTH_PASSWORD • CURLOPT_TLSAUTH_TYPE • CURLOPT_PROXYAUTH • CURLOPT_AUTOREFERER • CURLOPT_ACCEPT_ENCODING • CURLOPT_TRANSFER_ENCODING • CURLOPT_FOLLOWLOCATION • CURLOPT_UNRESTRICTED_AUTH • CURLOPT_MAXREDIRS • CURLOPT_POSTREDIR • CURLOPT_PUT • CURLOPT_POST • CURLOPT_POSTFIELDS • CURLOPT_POSTFIELDSIZE • CURLOPT_POSTFIELDSIZE_LARGE • CURLOPT_COPYPOSTFIELDS • CURLOPT_HTTPPOST • CURLOPT_REFERER • CURLOPT_USERAGENT • CURLOPT_HTTPHEADER • CURLOPT_HTTP200ALIASES • CURLOPT_COOKIE • CURLOPT_COOKIEFILE • CURLOPT_COOKIEJAR • CURLOPT_COOKIESESSION • CURLOPT_COOKIELIST • CURLOPT_HTTPGET • CURLOPT_HTTP_VERSION • CURLOPT_IGNORE_CONTENT_LENGTH • CURLOPT_HTTP_CONTENT_DECODING 1236
  • 10. Ring Documentation, Release 1.10 • CURLOPT_HTTP_TRANSFER_DECODING • CURLOPT_MAIL_FROM • CURLOPT_MAIL_RCPT • CURLOPT_TFTP_BLKSIZE • CURLOPT_FTPPORT • CURLOPT_QUOTE • CURLOPT_POSTQUOTE • CURLOPT_PREQUOTE • CURLOPT_APPEND • CURLOPT_FTP_USE_EPRT • CURLOPT_FTP_USE_EPSV • CURLOPT_FTP_USE_PRET • CURLOPT_FTP_CREATE_MISSING_DIRS • CURLOPT_FTP_RESPONSE_TIMEOUT • CURLOPT_FTP_ALTERNATIVE_TO_USER • CURLOPT_FTP_SKIP_PASV_IP • CURLOPT_FTPSSLAUTH • CURLOPT_FTP_SSL_CCC • CURLOPT_FTP_ACCOUNT • CURLOPT_FTP_FILEMETHOD • CURLOPT_RTSP_REQUEST • CURLOPT_RTSP_SESSION_ID • CURLOPT_RTSP_STREAM_URI • CURLOPT_RTSP_TRANSPORT • CURLOPT_RTSP_CLIENT_CSEQ • CURLOPT_RTSP_SERVER_CSEQ • CURLOPT_TRANSFERTEXT • CURLOPT_PROXY_TRANSFER_MODE • CURLOPT_CRLF • CURLOPT_RANGE • CURLOPT_RESUME_FROM • CURLOPT_RESUME_FROM_LARGE • CURLOPT_CUSTOMREQUEST • CURLOPT_FILETIME • CURLOPT_DIRLISTONLY • CURLOPT_NOBODY 1237