next up previous contents index
Next: Browsing in the source Up: Statements Previous: The tsfcom library

IO statement

  $\blacktriangleright$ PRINT
 
The   statement displays the value of it single argument.

  $\blacktriangleright$ SYSTEM
 
The   statement executes the UNIX command given by its single argument.

$\vartriangleright$ Example 14:Run the 'make' command in a X terminal

 

   SYSTEM("xterm -e make")

  $\blacktriangleright$ OPEN
 
The      function opens a file. Its first argument is the file name. The second argument is a string that describe the opening mode: The obsolete predefined constants RD="r", WR="w" and AP="a" are available. The OPEN function returns the file descriptor used by CLOSE and WRITE.

  $\blacktriangleright$ CLOSE
 
The   function closes the file specified by its single argument.
  $\blacktriangleright$ WRITE
 
The   function writes the value of its second argument in the file specified by its first argument.

$\vartriangleright$ Example 15:

     

   fid := OPEN("myfile.txt") 
   year := 1998 
   WRITE(fid,"IRISA ")  
   WRITE(fid,year)  
   CLOSE(fid)


next up previous contents index
Next: Browsing in the source Up: Statements Previous: The tsfcom library
Yann Mevel
1999-04-30