Difference between revisions of "Close"

From Mesham
Jump to navigationJump to search
(Created page with '== Overview == The close(f) function will close the file represented by handle ''f'' * '''Pass:''' A file handle of type File * '''Returns:''' Nothing == Example == #inc…')
 
m (4 revisions imported)
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
The close(f) function will close the file represented by handle ''f''
 
The close(f) function will close the file represented by handle ''f''
  
* '''Pass:''' A file handle of type [[File]]
+
* '''Pass:''' A [[File]] handle
 
* '''Returns:''' Nothing
 
* '''Returns:''' Nothing
  
Line 9: Line 9:
  
 
  #include <io>
 
  #include <io>
  var f:=open("myfile.txt","r");
+
   
close(f);
+
function void main() {
 +
    var f:=open("myfile.txt","r");
 +
    close(f);
 +
};
 +
 
 +
''Since: Version 1.0''
  
 
[[Category:Function Library]]
 
[[Category:Function Library]]
 
[[Category:IO Functions]]
 
[[Category:IO Functions]]

Latest revision as of 15:44, 15 April 2019

Overview

The close(f) function will close the file represented by handle f

  • Pass: A File handle
  • Returns: Nothing

Example

#include <io>

function void main() {
   var f:=open("myfile.txt","r");
   close(f);
};

Since: Version 1.0