next up previous contents
Next: Scilab variables Up: Some general features about Previous: Input and output of   Contents

Files: reading and writing data

Most program work on files. Sooner or later, they have to store or recover some information. Even more, files are the usual form of interchanging information between programs. Since programs maintain different structures of data that can be stored in very different ways, the access to the information contained in files can be very problematic. Basically, files can be in ASCII and binary formats. ASCII files can be read with any text editor or even from the operating system but are an inefficient method of storing information. An integer stored in 2 bytes (a `short' one in binary format) can use up to 6 bytes in ASCII. This is one of the reasons why programs usually store data in binary form. Binary files can not be seen with a text editor but we can access their content by reading groups of bytes which can be correctly interpreted by the program. We are going to divide this issue into how to save and load Scilab variables, how to read ASCII files and how to read binary files.



Subsections
next up previous contents
Next: Scilab variables Up: Some general features about Previous: Input and output of   Contents
je 2006-10-13