Difference between pages "Tanh" and "Open"

From Mesham
(Difference between pages)
Jump to navigationJump to search
m
 
 
Line 1: Line 1:
 
== Overview ==
 
== Overview ==
  
The tanh(d) function will find the hyperbolic tangent of the value or variable ''d'' passed to it.
+
This open(n,a) function will open the file of name ''n'' with mode of ''a''.
  
* '''Pass:''' A [[Double]] to find the hyperbolic tangent of
+
* '''Pass:''' The name of the file to open of type [[String]] and mode of type [[String]]
 
+
* '''Returns:''' A file handle of type [[File]]
* '''Returns:''' A [[Double]] representing the hyperbolic tangent
 
  
 
== Example ==
 
== Example ==
  
  #include <maths>
+
  #include <io>
  var d:=tanh(10.4);
+
   
var y:=tanh(d);
+
function void main() {
 +
    var f:=open("myfile.txt","r");
 +
    close(f);
 +
};
  
 
''Since: Version 1.0''
 
''Since: Version 1.0''
  
 
[[Category:Function Library]]
 
[[Category:Function Library]]
[[Category:Maths Functions]]
+
[[Category:IO Functions]]

Revision as of 14:36, 15 April 2013

Overview

This open(n,a) function will open the file of name n with mode of a.

  • Pass: The name of the file to open of type String and mode of type String
  • Returns: A file handle of type File

Example

#include <io>

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

Since: Version 1.0