Contents Previous Next Subchapters

Closing Files
Syntax close
close(
file)
See Also eof , exists , rmfile , isdir , read , write

Description
Closes the file specified by the character row vector file. If file is not specified, all open files that are open for reading or writing are closed.

Example
You can use the close function to reset a file marker to the first line of its file. If the file TEMP.DAT contains  
     1  2  3
     4  5  6
and you enter
     file = "TEMP.DAT"
     read(file, "int", 1, 3)
O-Matrix will respond
     [ 1 , 2 , 3 ]
If you continue by entering
     close(file)
     read(file, "int", 2, 3)
O-Matrix will respond
     {
     [ 1 , 2 , 3 ]
     [ 4 , 5 , 6 ]
     }