SlideShare a Scribd company logo
1 of 10
Download to read offline
Ring Documentation, Release 1.5.4
31.14 Rewind() Function
We can set the ļ¬le position to the beginning of the ļ¬le using the Rewind() function
Syntax:
Rewind(file handle)
31.15 Fgetpos() Function
We can get handle to the current ļ¬le position using the Fgetpos() function
Syntax:
Fgetpos(file handle) ---> position handle
31.16 Fsetpos() Function
We can set the current ļ¬le position using the Fgetpos() function
Syntax:
Fsetpos(file handle,position handle)
31.17 Clearerr() Function
We can clear the EOF error and the error indicators of a stream using the clearerr() function
Syntax:
Clearerr(file handle)
31.18 Feof() Function
We can test the end-of-ļ¬le indicator using the Feof() function
Syntax:
Feof(file handle) ---> returns 1 if EOF and 0 if not
31.19 Ferror() Function
We can test the error indicator of a given stream using the Ferror() function
Syntax:
Ferror(file handle) ---> returns 1 if error and 0 if not
31.14. Rewind() Function 225
Ring Documentation, Release 1.5.4
31.20 Perror() Function
We can print error message to the stderr using the Perror() function
Syntax:
Perror(cErrorMessage)
31.21 Fgetc() Function
We can get the next character from the stream using the Fgetc() function
Syntax:
Fgetc(file handle) ---> returns character or EOF
31.22 Fgets() Function
We can read new line from the stream using the Fgets() function
Syntax:
Fgets(file handle,nSize) ---> string
The function stop when nSize characters are read, new line character is read or EOF.
31.23 Fputc() Function
We can write a character to the stream using the Fputc() function
Syntax:
Fputc(file handle,cChar)
31.24 Fputs() Function
We can write a string to the stream using the Fputs() function
Syntax:
Fputs(file handle,cString)
31.25 Ungetc() Function
We can push a character to the stream using the Ungetc() function
The character will be available for the next read
Syntax:
31.20. Perror() Function 226
Ring Documentation, Release 1.5.4
Ungetc(file handle,character)
31.26 Fread() Function
We can read data from a stream using the Fread() function
Syntax:
Fread(file handle,nSize)
31.27 Fwrite() Function
We can write data to a stream using the Fwrite() function
Syntax:
Fwrite(file handle,cString)
31.28 Fexists() Function
We can check if a ļ¬le exists using the Fexists() function
Syntax:
Fexists(cFileName) ---> returns 1 if the file exists
Example:
see fexists("b:mahmoudappsringring.exe") + nl +
fexists("b:mahmoudappsringring2.exe") + nl
Output:
1
0
31.29 Example
The next program test some of the ļ¬le functions
See "testing file functions" + nl
See "open file" + nl
fp = fopen(exefolder() + "../tests/scripts/s65.ring","r")
See "reopen" + nl
fp = freopen(exefolder() + "../tests/scripts/s78.ring","r",fp)
See "close file" + nl
fclose(fp)
see "temp file" + nl
31.26. Fread() Function 227
Ring Documentation, Release 1.5.4
fp = tempfile()
fclose(fp)
see "temp name" + nl
see tempname() + nl
remove(exefolder() + "../tests/scripts/mytest2.txt")
write(exefolder() + "../tests/scripts/tests1.txt","hello")
rename(exefolder() + "../tests/scripts/test1.txt",exefolder() +
"../tests/scripts/mytests2.txt")
see "print file" + nl
fp = fopen(exefolder() + "../samples/fromdoc/filefuncs.ring","r")
r = fgetc(fp)
while isstring(r)
see r
r = fgetc(fp)
end
fclose(fp)
see nl+"print line from the file" + nl
fp = fopen(exefolder() + "../samples/fromdoc/filefuncs.ring","r")
r = fgets(fp,33)
see r + nl
fclose(fp)
fp = fopen(exefolder() + "../tests/scripts/test78.txt","w+")
fseek(fp,0,2) # goto end of file
fputc(fp,"t")
fputc(fp,"e")
fputc(fp,"s")
fputc(fp,"t")
fputs(fp,"tests2")
fclose(fp)
see "print file" + nl
see read(exefolder() + "../tests/scripts/test78.txt")
fp = fopen(exefolder() + "../tests/scripts/test78.txt","r")
see "testing ungetc() " + nl
for x = 1 to 3
r = fgetc(fp)
see r + nl
ungetc(fp,r)
next
fclose(fp)
see "testing fread() " + nl
fp = fopen(exefilename(),"rb")
r = fread(fp,100)
see r + nl
fclose(fp)
see "testing fwrite() " + nl
fp = fopen(exefolder() + "../tests/scripts/test1.txt","wb")
fwrite(fp,r)
fclose(fp)
The next example print part of the content of a binary ļ¬le
31.29. Example 228
Ring Documentation, Release 1.5.4
see "Testing: fread()" +" FileName: "+ exefilename() +nl +nl
fp = fopen(exefilename(),"rb")
r = fread(fp,800)
for n =1 to len(r)
if isprint(substr(r, n, 1))
see substr(r, n, 1)
else
see "."
ok
### 80 char per line
if n % 80 = 0
see nl
ok
next
fclose(fp)
31.30 Numbers and Bytes
The next functions to convert between Numbers and Bytes.
ā€¢ Int2Bytes()
ā€¢ Float2Bytes()
ā€¢ Double2Bytes()
ā€¢ Bytes2Int()
ā€¢ Bytes2Float()
ā€¢ 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
31.30. Numbers and Bytes 229
CHAPTER
THIRTYTWO
SYSTEM FUNCTIONS
In this chapter we are going to learn about the system functions
ā€¢ System()
ā€¢ SystemCmd()
ā€¢ SysGet()
ā€¢ IsMSDOS()
ā€¢ IsWindows()
ā€¢ IsWindows64()
ā€¢ IsUnix()
ā€¢ IsMacOSX()
ā€¢ IsLinux()
ā€¢ IsFreeBSD()
ā€¢ IsAndroid()
ā€¢ Windowsnl()
ā€¢ Get Command Line Arguments
ā€¢ Get Active Source File Name
ā€¢ CurrentDir()
ā€¢ ExeFileName()
ā€¢ ChDir()
ā€¢ ExeFolder()
ā€¢ Version()
ā€¢ Shutdown()
32.1 System() Function
We can execute system commands using the system() function
Syntax:
System(cCommand)
230
Ring Documentation, Release 1.5.4
Example:
System("myapp.exe") # Run myapp.exe
System("ls") # print list of files
32.2 SysGet() Function
We can get environment variables using the Get() function
Syntax:
SysGet(cVariable)
Example:
see sysget("path") # print system path information
32.3 IsMSDOS() Function
We can check if the operating system is MSDOS or not using the IsMSDOS() function
Syntax:
IsMSDOS() ---> Returns 1 if the operating system is MS-DOS, Returns 0 if it's not
32.4 IsWindows() Function
We can check if the operating system is Windows or not using the IsWindows() function
Syntax:
IsWindows() ---> Returns 1 if the operating system is Windows, Returns 0 if it's not
32.5 IsWindows64() Function
We can check if the operating system is Windows 64bit or not using the IsWindows64() function
Syntax:
IsWindows64() ---> Returns 1 if the operating system is Windows64, Returns 0 if it's not
32.6 IsUnix() Function
We can check if the operating system is Unix or not using the IsUnix() function
Syntax:
IsUnix() ---> Returns 1 if the operating system is Unix, Returns 0 if it's not
32.2. SysGet() Function 231
Ring Documentation, Release 1.5.4
32.7 IsMacOSX() Function
We can check if the operating system is Mac OS X or not using the IsMacOSX() function
Syntax:
IsMacOSX() ---> Returns 1 if the operating system is Mac OS X, Returns 0 if it's not
32.8 IsLinux() Function
We can check if the operating system is Linux or not using the IsLinux() function
Syntax:
IsLinux() ---> Returns 1 if the operating system is Linux, Returns 0 if it's not
32.9 IsFreeBSD() Function
We can check if the operating system is FreeBSD or not using the IsFreeBSD() function
Syntax:
IsFreeBSD() ---> Returns 1 if the operating system is FreeBSD, Returns 0 if it's not
32.10 IsAndroid() Function
We can check if the operating system is Android or not using the IsAndroid() function
Syntax:
IsAndroid() ---> Returns 1 if the operating system is Android, Returns 0 if it's not
32.11 Example
see "IsMSDOS() --> " + ismsdos() + nl
see "IsWindows() --> " + iswindows() + nl
see "IsWindows64() --> " + iswindows64() + nl
see "IsUnix() --> " + isunix() + nl
see "IsMacOSX() --> " + ismacosx() + nl
see "IsLinux() --> " + islinux() + nl
see "IsFreeBSD() --> " + isfreebsd() + nl
see "IsAndroid() --> " + isandroid() + nl
Output:
IsMSDOS() --> 0
IsWindows() --> 1
IsWindows64() --> 0
IsUnix() --> 0
IsMacOSX() --> 0
32.7. IsMacOSX() Function 232
Ring Documentation, Release 1.5.4
IsLinux() --> 0
IsFreeBSD() --> 0
IsAndroid() --> 0
32.12 Windowsnl() Function
We can get the windows new line string using the Windowsnl() function.
Syntax:
WindowsNL() ---> Returns a string contains CR+LF = CHAR(13) + CHAR(10)
Example:
cStr = read("input.txt")
if iswindows()
cStr = substr(cStr,windowsnl(),nl)
ok
aList = str2list(cStr)
# to do - list items processing using "for in"
cStr = list2str(aList)
if iswindows()
cStr = substr(cStr,nl,windowsnl())
ok
write("ouput.txt",cStr)
32.13 Get Command Line Arguments
We can get the command line arguments passed to the ring script using the sysargv variable.
The sysargv variable is a list contains the command line parameters.
Example
see copy("=",30) + nl
see "Command Line Parameters" + nl
see "Size : " + len(sysargv) + nl
see sysargv
see copy("=",30) + nl
if len(sysargv) < 4 return ok
nStart = sysargv[3]
nEnd = sysargv[4]
for x = nStart to nEnd
see x + nl
next
Output
b:mahmoudappsring>ring testssyspara.ring 1 10
==============================
Command Line Parameters
32.12. Windowsnl() Function 233
Ring Documentation, Release 1.5.4
Size : 4
ring
testssyspara.ring
1
10
==============================
1
2
3
4
5
6
7
8
9
10
32.14 Get Active Source File Name
We can get the active source ļ¬le name (*.ring) using the ļ¬lename() function
Syntax:
filename() ---> String contains the active source file name.
Example:
see "Active Source File Name : " + filename() + nl
Output:
Active Source File Name : testsfilename.ring
Example:
if sysargv[2] = filename()
see "I'm the main program file!" + nl
# we can run tests here!
else
see "I'm a sub file in a program" + nl
ok
32.15 PrevFileName() Function
Using the PrevFileName() function we can get the previous active source ļ¬le name.
The previous ļ¬le would be the ļ¬le of the caller function, Or the ļ¬le of the function that we called before calling
PrevFileName().
Syntax:
prevfilename() ---> String contains the previous source file name.
Example:
The next function in stdlib.ring uses the PrevFileName() to know if the ļ¬le of the caller function is the main source
ļ¬le of the program or not.
32.14. Get Active Source File Name 234

More Related Content

What's hot

The Ring programming language version 1.8 book - Part 31 of 202
The Ring programming language version 1.8 book - Part 31 of 202The Ring programming language version 1.8 book - Part 31 of 202
The Ring programming language version 1.8 book - Part 31 of 202Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.6 book - Part 28 of 189
The Ring programming language version 1.6 book - Part 28 of 189The Ring programming language version 1.6 book - Part 28 of 189
The Ring programming language version 1.6 book - Part 28 of 189Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.7 book - Part 29 of 196
The Ring programming language version 1.7 book - Part 29 of 196The Ring programming language version 1.7 book - Part 29 of 196
The Ring programming language version 1.7 book - Part 29 of 196Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.3 book - Part 17 of 88
The Ring programming language version 1.3 book - Part 17 of 88The Ring programming language version 1.3 book - Part 17 of 88
The Ring programming language version 1.3 book - Part 17 of 88Mahmoud Samir Fayed
Ā 
Dagger & rxjava & retrofit
Dagger & rxjava & retrofitDagger & rxjava & retrofit
Dagger & rxjava & retrofitTed Liang
Ā 
The Ring programming language version 1.4.1 book - Part 3 of 31
The Ring programming language version 1.4.1 book - Part 3 of 31The Ring programming language version 1.4.1 book - Part 3 of 31
The Ring programming language version 1.4.1 book - Part 3 of 31Mahmoud Samir Fayed
Ā 
Java practice programs for beginners
Java practice programs for beginnersJava practice programs for beginners
Java practice programs for beginnersishan0019
Ā 
ć‚Ŗćƒ¼ćƒ—ćƒ³ćƒ‡ćƒ¼ć‚æ悒ä½æć£ćŸćƒ¢ćƒć‚¤ćƒ«ć‚¢ćƒ—ćƒŖ開ē™ŗļ¼ˆåæœē”Øē·Øļ¼‰
ć‚Ŗćƒ¼ćƒ—ćƒ³ćƒ‡ćƒ¼ć‚æ悒ä½æć£ćŸćƒ¢ćƒć‚¤ćƒ«ć‚¢ćƒ—ćƒŖ開ē™ŗļ¼ˆåæœē”Øē·Øļ¼‰ć‚Ŗćƒ¼ćƒ—ćƒ³ćƒ‡ćƒ¼ć‚æ悒ä½æć£ćŸćƒ¢ćƒć‚¤ćƒ«ć‚¢ćƒ—ćƒŖ開ē™ŗļ¼ˆåæœē”Øē·Øļ¼‰
ć‚Ŗćƒ¼ćƒ—ćƒ³ćƒ‡ćƒ¼ć‚æ悒ä½æć£ćŸćƒ¢ćƒć‚¤ćƒ«ć‚¢ćƒ—ćƒŖ開ē™ŗļ¼ˆåæœē”Øē·Øļ¼‰Takayuki Goto
Ā 
The Ring programming language version 1.7 book - Part 7 of 196
The Ring programming language version 1.7 book - Part 7 of 196The Ring programming language version 1.7 book - Part 7 of 196
The Ring programming language version 1.7 book - Part 7 of 196Mahmoud Samir Fayed
Ā 
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 181Mahmoud Samir Fayed
Ā 
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 210Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.6 book - Part 71 of 189
The Ring programming language version 1.6 book - Part 71 of 189The Ring programming language version 1.6 book - Part 71 of 189
The Ring programming language version 1.6 book - Part 71 of 189Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.9 book - Part 42 of 210
The Ring programming language version 1.9 book - Part 42 of 210The Ring programming language version 1.9 book - Part 42 of 210
The Ring programming language version 1.9 book - Part 42 of 210Mahmoud Samir Fayed
Ā 
Joker 2015 - Š’Š°Š»ŠµŠµŠ² Š¢Š°Š³Šøр - Š§Ń‚Š¾ Š¶Šµ Š¼Ń‹ ŠøŠ·Š¼ŠµŃ€ŃŠµŠ¼?
Joker 2015 - Š’Š°Š»ŠµŠµŠ² Š¢Š°Š³Šøр - Š§Ń‚Š¾ Š¶Šµ Š¼Ń‹ ŠøŠ·Š¼ŠµŃ€ŃŠµŠ¼?Joker 2015 - Š’Š°Š»ŠµŠµŠ² Š¢Š°Š³Šøр - Š§Ń‚Š¾ Š¶Šµ Š¼Ń‹ ŠøŠ·Š¼ŠµŃ€ŃŠµŠ¼?
Joker 2015 - Š’Š°Š»ŠµŠµŠ² Š¢Š°Š³Šøр - Š§Ń‚Š¾ Š¶Šµ Š¼Ń‹ ŠøŠ·Š¼ŠµŃ€ŃŠµŠ¼?tvaleev
Ā 
The Ring programming language version 1.5.1 book - Part 65 of 180
The Ring programming language version 1.5.1 book - Part 65 of 180The Ring programming language version 1.5.1 book - Part 65 of 180
The Ring programming language version 1.5.1 book - Part 65 of 180Mahmoud Samir Fayed
Ā 
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 88Mahmoud Samir Fayed
Ā 
Why learn Internals?
Why learn Internals?Why learn Internals?
Why learn Internals?Shaul Rosenzwieg
Ā 
The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88Mahmoud Samir Fayed
Ā 
Use C++ to Manipulate mozSettings in Gecko
Use C++ to Manipulate mozSettings in GeckoUse C++ to Manipulate mozSettings in Gecko
Use C++ to Manipulate mozSettings in GeckoChih-Hsuan Kuo
Ā 
The Ring programming language version 1.8 book - Part 40 of 202
The Ring programming language version 1.8 book - Part 40 of 202The Ring programming language version 1.8 book - Part 40 of 202
The Ring programming language version 1.8 book - Part 40 of 202Mahmoud Samir Fayed
Ā 

What's hot (20)

The Ring programming language version 1.8 book - Part 31 of 202
The Ring programming language version 1.8 book - Part 31 of 202The Ring programming language version 1.8 book - Part 31 of 202
The Ring programming language version 1.8 book - Part 31 of 202
Ā 
The Ring programming language version 1.6 book - Part 28 of 189
The Ring programming language version 1.6 book - Part 28 of 189The Ring programming language version 1.6 book - Part 28 of 189
The Ring programming language version 1.6 book - Part 28 of 189
Ā 
The Ring programming language version 1.7 book - Part 29 of 196
The Ring programming language version 1.7 book - Part 29 of 196The Ring programming language version 1.7 book - Part 29 of 196
The Ring programming language version 1.7 book - Part 29 of 196
Ā 
The Ring programming language version 1.3 book - Part 17 of 88
The Ring programming language version 1.3 book - Part 17 of 88The Ring programming language version 1.3 book - Part 17 of 88
The Ring programming language version 1.3 book - Part 17 of 88
Ā 
Dagger & rxjava & retrofit
Dagger & rxjava & retrofitDagger & rxjava & retrofit
Dagger & rxjava & retrofit
Ā 
The Ring programming language version 1.4.1 book - Part 3 of 31
The Ring programming language version 1.4.1 book - Part 3 of 31The Ring programming language version 1.4.1 book - Part 3 of 31
The Ring programming language version 1.4.1 book - Part 3 of 31
Ā 
Java practice programs for beginners
Java practice programs for beginnersJava practice programs for beginners
Java practice programs for beginners
Ā 
ć‚Ŗćƒ¼ćƒ—ćƒ³ćƒ‡ćƒ¼ć‚æ悒ä½æć£ćŸćƒ¢ćƒć‚¤ćƒ«ć‚¢ćƒ—ćƒŖ開ē™ŗļ¼ˆåæœē”Øē·Øļ¼‰
ć‚Ŗćƒ¼ćƒ—ćƒ³ćƒ‡ćƒ¼ć‚æ悒ä½æć£ćŸćƒ¢ćƒć‚¤ćƒ«ć‚¢ćƒ—ćƒŖ開ē™ŗļ¼ˆåæœē”Øē·Øļ¼‰ć‚Ŗćƒ¼ćƒ—ćƒ³ćƒ‡ćƒ¼ć‚æ悒ä½æć£ćŸćƒ¢ćƒć‚¤ćƒ«ć‚¢ćƒ—ćƒŖ開ē™ŗļ¼ˆåæœē”Øē·Øļ¼‰
ć‚Ŗćƒ¼ćƒ—ćƒ³ćƒ‡ćƒ¼ć‚æ悒ä½æć£ćŸćƒ¢ćƒć‚¤ćƒ«ć‚¢ćƒ—ćƒŖ開ē™ŗļ¼ˆåæœē”Øē·Øļ¼‰
Ā 
The Ring programming language version 1.7 book - Part 7 of 196
The Ring programming language version 1.7 book - Part 7 of 196The Ring programming language version 1.7 book - Part 7 of 196
The Ring programming language version 1.7 book - Part 7 of 196
Ā 
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.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.6 book - Part 71 of 189
The Ring programming language version 1.6 book - Part 71 of 189The Ring programming language version 1.6 book - Part 71 of 189
The Ring programming language version 1.6 book - Part 71 of 189
Ā 
The Ring programming language version 1.9 book - Part 42 of 210
The Ring programming language version 1.9 book - Part 42 of 210The Ring programming language version 1.9 book - Part 42 of 210
The Ring programming language version 1.9 book - Part 42 of 210
Ā 
Joker 2015 - Š’Š°Š»ŠµŠµŠ² Š¢Š°Š³Šøр - Š§Ń‚Š¾ Š¶Šµ Š¼Ń‹ ŠøŠ·Š¼ŠµŃ€ŃŠµŠ¼?
Joker 2015 - Š’Š°Š»ŠµŠµŠ² Š¢Š°Š³Šøр - Š§Ń‚Š¾ Š¶Šµ Š¼Ń‹ ŠøŠ·Š¼ŠµŃ€ŃŠµŠ¼?Joker 2015 - Š’Š°Š»ŠµŠµŠ² Š¢Š°Š³Šøр - Š§Ń‚Š¾ Š¶Šµ Š¼Ń‹ ŠøŠ·Š¼ŠµŃ€ŃŠµŠ¼?
Joker 2015 - Š’Š°Š»ŠµŠµŠ² Š¢Š°Š³Šøр - Š§Ń‚Š¾ Š¶Šµ Š¼Ń‹ ŠøŠ·Š¼ŠµŃ€ŃŠµŠ¼?
Ā 
The Ring programming language version 1.5.1 book - Part 65 of 180
The Ring programming language version 1.5.1 book - Part 65 of 180The Ring programming language version 1.5.1 book - Part 65 of 180
The Ring programming language version 1.5.1 book - Part 65 of 180
Ā 
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
Ā 
Why learn Internals?
Why learn Internals?Why learn Internals?
Why learn Internals?
Ā 
The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88
Ā 
Use C++ to Manipulate mozSettings in Gecko
Use C++ to Manipulate mozSettings in GeckoUse C++ to Manipulate mozSettings in Gecko
Use C++ to Manipulate mozSettings in Gecko
Ā 
The Ring programming language version 1.8 book - Part 40 of 202
The Ring programming language version 1.8 book - Part 40 of 202The Ring programming language version 1.8 book - Part 40 of 202
The Ring programming language version 1.8 book - Part 40 of 202
Ā 

Similar to File handling and system functions in Ring

The Ring programming language version 1.10 book - Part 34 of 212
The Ring programming language version 1.10 book - Part 34 of 212The Ring programming language version 1.10 book - Part 34 of 212
The Ring programming language version 1.10 book - Part 34 of 212Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.5.1 book - Part 24 of 180
The Ring programming language version 1.5.1 book - Part 24 of 180The Ring programming language version 1.5.1 book - Part 24 of 180
The Ring programming language version 1.5.1 book - Part 24 of 180Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.2 book - Part 15 of 84
The Ring programming language version 1.2 book - Part 15 of 84The Ring programming language version 1.2 book - Part 15 of 84
The Ring programming language version 1.2 book - Part 15 of 84Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.5.2 book - Part 26 of 181
The Ring programming language version 1.5.2 book - Part 26 of 181The Ring programming language version 1.5.2 book - Part 26 of 181
The Ring programming language version 1.5.2 book - Part 26 of 181Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.2 book - Part 16 of 84
The Ring programming language version 1.2 book - Part 16 of 84The Ring programming language version 1.2 book - Part 16 of 84
The Ring programming language version 1.2 book - Part 16 of 84Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.5 book - Part 5 of 31
The Ring programming language version 1.5 book - Part 5 of 31The Ring programming language version 1.5 book - Part 5 of 31
The Ring programming language version 1.5 book - Part 5 of 31Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.5.4 book - Part 25 of 185
The Ring programming language version 1.5.4 book - Part 25 of 185The Ring programming language version 1.5.4 book - Part 25 of 185
The Ring programming language version 1.5.4 book - Part 25 of 185Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.6 book - Part 27 of 189
The Ring programming language version 1.6 book - Part 27 of 189The Ring programming language version 1.6 book - Part 27 of 189
The Ring programming language version 1.6 book - Part 27 of 189Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.8 book - Part 30 of 202
The Ring programming language version 1.8 book - Part 30 of 202The Ring programming language version 1.8 book - Part 30 of 202
The Ring programming language version 1.8 book - Part 30 of 202Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.3 book - Part 23 of 88
The Ring programming language version 1.3 book - Part 23 of 88The Ring programming language version 1.3 book - Part 23 of 88
The Ring programming language version 1.3 book - Part 23 of 88Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.6 book - Part 37 of 189
The Ring programming language version 1.6 book - Part 37 of 189The Ring programming language version 1.6 book - Part 37 of 189
The Ring programming language version 1.6 book - Part 37 of 189Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.2 book - Part 21 of 84
The Ring programming language version 1.2 book - Part 21 of 84The Ring programming language version 1.2 book - Part 21 of 84
The Ring programming language version 1.2 book - Part 21 of 84Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.5.2 book - Part 31 of 181
The Ring programming language version 1.5.2 book - Part 31 of 181The Ring programming language version 1.5.2 book - Part 31 of 181
The Ring programming language version 1.5.2 book - Part 31 of 181Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.5.2 book - Part 34 of 181
The Ring programming language version 1.5.2 book - Part 34 of 181The Ring programming language version 1.5.2 book - Part 34 of 181
The Ring programming language version 1.5.2 book - Part 34 of 181Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.3 book - Part 83 of 88
The Ring programming language version 1.3 book - Part 83 of 88The Ring programming language version 1.3 book - Part 83 of 88
The Ring programming language version 1.3 book - Part 83 of 88Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.5.4 book - Part 27 of 185
The Ring programming language version 1.5.4 book - Part 27 of 185The Ring programming language version 1.5.4 book - Part 27 of 185
The Ring programming language version 1.5.4 book - Part 27 of 185Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.5.4 book - Part 35 of 185
The Ring programming language version 1.5.4 book - Part 35 of 185The Ring programming language version 1.5.4 book - Part 35 of 185
The Ring programming language version 1.5.4 book - Part 35 of 185Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.3 book - Part 25 of 88
The Ring programming language version 1.3 book - Part 25 of 88The Ring programming language version 1.3 book - Part 25 of 88
The Ring programming language version 1.3 book - Part 25 of 88Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.9 book - Part 32 of 210
The Ring programming language version 1.9 book - Part 32 of 210The Ring programming language version 1.9 book - Part 32 of 210
The Ring programming language version 1.9 book - Part 32 of 210Mahmoud Samir Fayed
Ā 
The Ring programming language version 1.5.2 book - Part 75 of 181
The Ring programming language version 1.5.2 book - Part 75 of 181The Ring programming language version 1.5.2 book - Part 75 of 181
The Ring programming language version 1.5.2 book - Part 75 of 181Mahmoud Samir Fayed
Ā 

Similar to File handling and system functions in Ring (20)

The Ring programming language version 1.10 book - Part 34 of 212
The Ring programming language version 1.10 book - Part 34 of 212The Ring programming language version 1.10 book - Part 34 of 212
The Ring programming language version 1.10 book - Part 34 of 212
Ā 
The Ring programming language version 1.5.1 book - Part 24 of 180
The Ring programming language version 1.5.1 book - Part 24 of 180The Ring programming language version 1.5.1 book - Part 24 of 180
The Ring programming language version 1.5.1 book - Part 24 of 180
Ā 
The Ring programming language version 1.2 book - Part 15 of 84
The Ring programming language version 1.2 book - Part 15 of 84The Ring programming language version 1.2 book - Part 15 of 84
The Ring programming language version 1.2 book - Part 15 of 84
Ā 
The Ring programming language version 1.5.2 book - Part 26 of 181
The Ring programming language version 1.5.2 book - Part 26 of 181The Ring programming language version 1.5.2 book - Part 26 of 181
The Ring programming language version 1.5.2 book - Part 26 of 181
Ā 
The Ring programming language version 1.2 book - Part 16 of 84
The Ring programming language version 1.2 book - Part 16 of 84The Ring programming language version 1.2 book - Part 16 of 84
The Ring programming language version 1.2 book - Part 16 of 84
Ā 
The Ring programming language version 1.5 book - Part 5 of 31
The Ring programming language version 1.5 book - Part 5 of 31The Ring programming language version 1.5 book - Part 5 of 31
The Ring programming language version 1.5 book - Part 5 of 31
Ā 
The Ring programming language version 1.5.4 book - Part 25 of 185
The Ring programming language version 1.5.4 book - Part 25 of 185The Ring programming language version 1.5.4 book - Part 25 of 185
The Ring programming language version 1.5.4 book - Part 25 of 185
Ā 
The Ring programming language version 1.6 book - Part 27 of 189
The Ring programming language version 1.6 book - Part 27 of 189The Ring programming language version 1.6 book - Part 27 of 189
The Ring programming language version 1.6 book - Part 27 of 189
Ā 
The Ring programming language version 1.8 book - Part 30 of 202
The Ring programming language version 1.8 book - Part 30 of 202The Ring programming language version 1.8 book - Part 30 of 202
The Ring programming language version 1.8 book - Part 30 of 202
Ā 
The Ring programming language version 1.3 book - Part 23 of 88
The Ring programming language version 1.3 book - Part 23 of 88The Ring programming language version 1.3 book - Part 23 of 88
The Ring programming language version 1.3 book - Part 23 of 88
Ā 
The Ring programming language version 1.6 book - Part 37 of 189
The Ring programming language version 1.6 book - Part 37 of 189The Ring programming language version 1.6 book - Part 37 of 189
The Ring programming language version 1.6 book - Part 37 of 189
Ā 
The Ring programming language version 1.2 book - Part 21 of 84
The Ring programming language version 1.2 book - Part 21 of 84The Ring programming language version 1.2 book - Part 21 of 84
The Ring programming language version 1.2 book - Part 21 of 84
Ā 
The Ring programming language version 1.5.2 book - Part 31 of 181
The Ring programming language version 1.5.2 book - Part 31 of 181The Ring programming language version 1.5.2 book - Part 31 of 181
The Ring programming language version 1.5.2 book - Part 31 of 181
Ā 
The Ring programming language version 1.5.2 book - Part 34 of 181
The Ring programming language version 1.5.2 book - Part 34 of 181The Ring programming language version 1.5.2 book - Part 34 of 181
The Ring programming language version 1.5.2 book - Part 34 of 181
Ā 
The Ring programming language version 1.3 book - Part 83 of 88
The Ring programming language version 1.3 book - Part 83 of 88The Ring programming language version 1.3 book - Part 83 of 88
The Ring programming language version 1.3 book - Part 83 of 88
Ā 
The Ring programming language version 1.5.4 book - Part 27 of 185
The Ring programming language version 1.5.4 book - Part 27 of 185The Ring programming language version 1.5.4 book - Part 27 of 185
The Ring programming language version 1.5.4 book - Part 27 of 185
Ā 
The Ring programming language version 1.5.4 book - Part 35 of 185
The Ring programming language version 1.5.4 book - Part 35 of 185The Ring programming language version 1.5.4 book - Part 35 of 185
The Ring programming language version 1.5.4 book - Part 35 of 185
Ā 
The Ring programming language version 1.3 book - Part 25 of 88
The Ring programming language version 1.3 book - Part 25 of 88The Ring programming language version 1.3 book - Part 25 of 88
The Ring programming language version 1.3 book - Part 25 of 88
Ā 
The Ring programming language version 1.9 book - Part 32 of 210
The Ring programming language version 1.9 book - Part 32 of 210The Ring programming language version 1.9 book - Part 32 of 210
The Ring programming language version 1.9 book - Part 32 of 210
Ā 
The Ring programming language version 1.5.2 book - Part 75 of 181
The Ring programming language version 1.5.2 book - Part 75 of 181The Ring programming language version 1.5.2 book - Part 75 of 181
The Ring programming language version 1.5.2 book - Part 75 of 181
Ā 

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

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
Ā 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
Ā 
FULL ENJOY šŸ” 8264348440 šŸ” Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY šŸ” 8264348440 šŸ” Call Girls in Diplomatic Enclave | DelhiFULL ENJOY šŸ” 8264348440 šŸ” Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY šŸ” 8264348440 šŸ” Call Girls in Diplomatic Enclave | Delhisoniya singh
Ā 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
Ā 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
Ā 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
Ā 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
Ā 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
Ā 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
Ā 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
Ā 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
Ā 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
Ā 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
Ā 
Swan(sea) Song ā€“ personal research during my six years at Swansea ... and bey...
Swan(sea) Song ā€“ personal research during my six years at Swansea ... and bey...Swan(sea) Song ā€“ personal research during my six years at Swansea ... and bey...
Swan(sea) Song ā€“ personal research during my six years at Swansea ... and bey...Alan Dix
Ā 
Transcript: #StandardsGoals for 2024: Whatā€™s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: Whatā€™s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: Whatā€™s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: Whatā€™s new for BISAC - Tech Forum 2024BookNet Canada
Ā 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
Ā 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
Ā 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
Ā 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
Ā 

Recently uploaded (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Ā 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Ā 
FULL ENJOY šŸ” 8264348440 šŸ” Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY šŸ” 8264348440 šŸ” Call Girls in Diplomatic Enclave | DelhiFULL ENJOY šŸ” 8264348440 šŸ” Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY šŸ” 8264348440 šŸ” Call Girls in Diplomatic Enclave | Delhi
Ā 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Ā 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
Ā 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Ā 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Ā 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Ā 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Ā 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Ā 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Ā 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Ā 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Ā 
Swan(sea) Song ā€“ personal research during my six years at Swansea ... and bey...
Swan(sea) Song ā€“ personal research during my six years at Swansea ... and bey...Swan(sea) Song ā€“ personal research during my six years at Swansea ... and bey...
Swan(sea) Song ā€“ personal research during my six years at Swansea ... and bey...
Ā 
Transcript: #StandardsGoals for 2024: Whatā€™s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: Whatā€™s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: Whatā€™s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: Whatā€™s new for BISAC - Tech Forum 2024
Ā 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Ā 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Ā 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Ā 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
Ā 

File handling and system functions in Ring

  • 1. Ring Documentation, Release 1.5.4 31.14 Rewind() Function We can set the ļ¬le position to the beginning of the ļ¬le using the Rewind() function Syntax: Rewind(file handle) 31.15 Fgetpos() Function We can get handle to the current ļ¬le position using the Fgetpos() function Syntax: Fgetpos(file handle) ---> position handle 31.16 Fsetpos() Function We can set the current ļ¬le position using the Fgetpos() function Syntax: Fsetpos(file handle,position handle) 31.17 Clearerr() Function We can clear the EOF error and the error indicators of a stream using the clearerr() function Syntax: Clearerr(file handle) 31.18 Feof() Function We can test the end-of-ļ¬le indicator using the Feof() function Syntax: Feof(file handle) ---> returns 1 if EOF and 0 if not 31.19 Ferror() Function We can test the error indicator of a given stream using the Ferror() function Syntax: Ferror(file handle) ---> returns 1 if error and 0 if not 31.14. Rewind() Function 225
  • 2. Ring Documentation, Release 1.5.4 31.20 Perror() Function We can print error message to the stderr using the Perror() function Syntax: Perror(cErrorMessage) 31.21 Fgetc() Function We can get the next character from the stream using the Fgetc() function Syntax: Fgetc(file handle) ---> returns character or EOF 31.22 Fgets() Function We can read new line from the stream using the Fgets() function Syntax: Fgets(file handle,nSize) ---> string The function stop when nSize characters are read, new line character is read or EOF. 31.23 Fputc() Function We can write a character to the stream using the Fputc() function Syntax: Fputc(file handle,cChar) 31.24 Fputs() Function We can write a string to the stream using the Fputs() function Syntax: Fputs(file handle,cString) 31.25 Ungetc() Function We can push a character to the stream using the Ungetc() function The character will be available for the next read Syntax: 31.20. Perror() Function 226
  • 3. Ring Documentation, Release 1.5.4 Ungetc(file handle,character) 31.26 Fread() Function We can read data from a stream using the Fread() function Syntax: Fread(file handle,nSize) 31.27 Fwrite() Function We can write data to a stream using the Fwrite() function Syntax: Fwrite(file handle,cString) 31.28 Fexists() Function We can check if a ļ¬le exists using the Fexists() function Syntax: Fexists(cFileName) ---> returns 1 if the file exists Example: see fexists("b:mahmoudappsringring.exe") + nl + fexists("b:mahmoudappsringring2.exe") + nl Output: 1 0 31.29 Example The next program test some of the ļ¬le functions See "testing file functions" + nl See "open file" + nl fp = fopen(exefolder() + "../tests/scripts/s65.ring","r") See "reopen" + nl fp = freopen(exefolder() + "../tests/scripts/s78.ring","r",fp) See "close file" + nl fclose(fp) see "temp file" + nl 31.26. Fread() Function 227
  • 4. Ring Documentation, Release 1.5.4 fp = tempfile() fclose(fp) see "temp name" + nl see tempname() + nl remove(exefolder() + "../tests/scripts/mytest2.txt") write(exefolder() + "../tests/scripts/tests1.txt","hello") rename(exefolder() + "../tests/scripts/test1.txt",exefolder() + "../tests/scripts/mytests2.txt") see "print file" + nl fp = fopen(exefolder() + "../samples/fromdoc/filefuncs.ring","r") r = fgetc(fp) while isstring(r) see r r = fgetc(fp) end fclose(fp) see nl+"print line from the file" + nl fp = fopen(exefolder() + "../samples/fromdoc/filefuncs.ring","r") r = fgets(fp,33) see r + nl fclose(fp) fp = fopen(exefolder() + "../tests/scripts/test78.txt","w+") fseek(fp,0,2) # goto end of file fputc(fp,"t") fputc(fp,"e") fputc(fp,"s") fputc(fp,"t") fputs(fp,"tests2") fclose(fp) see "print file" + nl see read(exefolder() + "../tests/scripts/test78.txt") fp = fopen(exefolder() + "../tests/scripts/test78.txt","r") see "testing ungetc() " + nl for x = 1 to 3 r = fgetc(fp) see r + nl ungetc(fp,r) next fclose(fp) see "testing fread() " + nl fp = fopen(exefilename(),"rb") r = fread(fp,100) see r + nl fclose(fp) see "testing fwrite() " + nl fp = fopen(exefolder() + "../tests/scripts/test1.txt","wb") fwrite(fp,r) fclose(fp) The next example print part of the content of a binary ļ¬le 31.29. Example 228
  • 5. Ring Documentation, Release 1.5.4 see "Testing: fread()" +" FileName: "+ exefilename() +nl +nl fp = fopen(exefilename(),"rb") r = fread(fp,800) for n =1 to len(r) if isprint(substr(r, n, 1)) see substr(r, n, 1) else see "." ok ### 80 char per line if n % 80 = 0 see nl ok next fclose(fp) 31.30 Numbers and Bytes The next functions to convert between Numbers and Bytes. ā€¢ Int2Bytes() ā€¢ Float2Bytes() ā€¢ Double2Bytes() ā€¢ Bytes2Int() ā€¢ Bytes2Float() ā€¢ 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 31.30. Numbers and Bytes 229
  • 6. CHAPTER THIRTYTWO SYSTEM FUNCTIONS In this chapter we are going to learn about the system functions ā€¢ System() ā€¢ SystemCmd() ā€¢ SysGet() ā€¢ IsMSDOS() ā€¢ IsWindows() ā€¢ IsWindows64() ā€¢ IsUnix() ā€¢ IsMacOSX() ā€¢ IsLinux() ā€¢ IsFreeBSD() ā€¢ IsAndroid() ā€¢ Windowsnl() ā€¢ Get Command Line Arguments ā€¢ Get Active Source File Name ā€¢ CurrentDir() ā€¢ ExeFileName() ā€¢ ChDir() ā€¢ ExeFolder() ā€¢ Version() ā€¢ Shutdown() 32.1 System() Function We can execute system commands using the system() function Syntax: System(cCommand) 230
  • 7. Ring Documentation, Release 1.5.4 Example: System("myapp.exe") # Run myapp.exe System("ls") # print list of files 32.2 SysGet() Function We can get environment variables using the Get() function Syntax: SysGet(cVariable) Example: see sysget("path") # print system path information 32.3 IsMSDOS() Function We can check if the operating system is MSDOS or not using the IsMSDOS() function Syntax: IsMSDOS() ---> Returns 1 if the operating system is MS-DOS, Returns 0 if it's not 32.4 IsWindows() Function We can check if the operating system is Windows or not using the IsWindows() function Syntax: IsWindows() ---> Returns 1 if the operating system is Windows, Returns 0 if it's not 32.5 IsWindows64() Function We can check if the operating system is Windows 64bit or not using the IsWindows64() function Syntax: IsWindows64() ---> Returns 1 if the operating system is Windows64, Returns 0 if it's not 32.6 IsUnix() Function We can check if the operating system is Unix or not using the IsUnix() function Syntax: IsUnix() ---> Returns 1 if the operating system is Unix, Returns 0 if it's not 32.2. SysGet() Function 231
  • 8. Ring Documentation, Release 1.5.4 32.7 IsMacOSX() Function We can check if the operating system is Mac OS X or not using the IsMacOSX() function Syntax: IsMacOSX() ---> Returns 1 if the operating system is Mac OS X, Returns 0 if it's not 32.8 IsLinux() Function We can check if the operating system is Linux or not using the IsLinux() function Syntax: IsLinux() ---> Returns 1 if the operating system is Linux, Returns 0 if it's not 32.9 IsFreeBSD() Function We can check if the operating system is FreeBSD or not using the IsFreeBSD() function Syntax: IsFreeBSD() ---> Returns 1 if the operating system is FreeBSD, Returns 0 if it's not 32.10 IsAndroid() Function We can check if the operating system is Android or not using the IsAndroid() function Syntax: IsAndroid() ---> Returns 1 if the operating system is Android, Returns 0 if it's not 32.11 Example see "IsMSDOS() --> " + ismsdos() + nl see "IsWindows() --> " + iswindows() + nl see "IsWindows64() --> " + iswindows64() + nl see "IsUnix() --> " + isunix() + nl see "IsMacOSX() --> " + ismacosx() + nl see "IsLinux() --> " + islinux() + nl see "IsFreeBSD() --> " + isfreebsd() + nl see "IsAndroid() --> " + isandroid() + nl Output: IsMSDOS() --> 0 IsWindows() --> 1 IsWindows64() --> 0 IsUnix() --> 0 IsMacOSX() --> 0 32.7. IsMacOSX() Function 232
  • 9. Ring Documentation, Release 1.5.4 IsLinux() --> 0 IsFreeBSD() --> 0 IsAndroid() --> 0 32.12 Windowsnl() Function We can get the windows new line string using the Windowsnl() function. Syntax: WindowsNL() ---> Returns a string contains CR+LF = CHAR(13) + CHAR(10) Example: cStr = read("input.txt") if iswindows() cStr = substr(cStr,windowsnl(),nl) ok aList = str2list(cStr) # to do - list items processing using "for in" cStr = list2str(aList) if iswindows() cStr = substr(cStr,nl,windowsnl()) ok write("ouput.txt",cStr) 32.13 Get Command Line Arguments We can get the command line arguments passed to the ring script using the sysargv variable. The sysargv variable is a list contains the command line parameters. Example see copy("=",30) + nl see "Command Line Parameters" + nl see "Size : " + len(sysargv) + nl see sysargv see copy("=",30) + nl if len(sysargv) < 4 return ok nStart = sysargv[3] nEnd = sysargv[4] for x = nStart to nEnd see x + nl next Output b:mahmoudappsring>ring testssyspara.ring 1 10 ============================== Command Line Parameters 32.12. Windowsnl() Function 233
  • 10. Ring Documentation, Release 1.5.4 Size : 4 ring testssyspara.ring 1 10 ============================== 1 2 3 4 5 6 7 8 9 10 32.14 Get Active Source File Name We can get the active source ļ¬le name (*.ring) using the ļ¬lename() function Syntax: filename() ---> String contains the active source file name. Example: see "Active Source File Name : " + filename() + nl Output: Active Source File Name : testsfilename.ring Example: if sysargv[2] = filename() see "I'm the main program file!" + nl # we can run tests here! else see "I'm a sub file in a program" + nl ok 32.15 PrevFileName() Function Using the PrevFileName() function we can get the previous active source ļ¬le name. The previous ļ¬le would be the ļ¬le of the caller function, Or the ļ¬le of the function that we called before calling PrevFileName(). Syntax: prevfilename() ---> String contains the previous source file name. Example: The next function in stdlib.ring uses the PrevFileName() to know if the ļ¬le of the caller function is the main source ļ¬le of the program or not. 32.14. Get Active Source File Name 234