Difference between pages "Ceil" and "Writestring"

From Mesham
(Difference between pages)
Jump to navigationJump to search
 
m (4 revisions imported)
 
Line 1: Line 1:
 
== Overview ==
 
== Overview ==
This ceil(d) function will find the smallest integer greater than or equal to ''d''.
 
  
* '''Pass:''' A [[Double]] to find the ceil of
+
This writestring(f,a) function will write the value of ''a'' to the file denoted by handle ''f''.
* '''Returns:''' An [[Int]] representing the ceiling
+
 
 +
* '''Pass:''' The [[File]] handle to write to and the [[String]] to write
 +
* '''Returns:''' Nothing
  
 
== Example ==
 
== Example ==
  
  #include <maths>
+
  #include <io>
 +
 
  function void main() {
 
  function void main() {
     var a:=ceil(10.5);
+
     var f:=open("hello.txt","w");
     var y:=ceil(a);
+
     writestring(f,"hello - test");
 +
    close(f);  
 
  };
 
  };
  
Line 16: Line 19:
  
 
[[Category:Function Library]]
 
[[Category:Function Library]]
[[Category:Maths Functions]]
+
[[Category:IO Functions]]

Latest revision as of 15:44, 15 April 2019

Overview

This writestring(f,a) function will write the value of a to the file denoted by handle f.

  • Pass: The File handle to write to and the String to write
  • Returns: Nothing

Example

#include <io>

function void main() {
   var f:=open("hello.txt","w");
   writestring(f,"hello - test");
   close(f); 
};

Since: Version 0.41b