Show
Ignore:
Timestamp:
08/05/09 14:40:03 (15 years ago)
Author:
mido
Message:

panove, vite, jak jsem peclivej na upravu kodu.. snad se vam bude libit:) konfigurace je v souboru /system/astylerc

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/doc/tutorial/src/write_it_file.cpp

    r278 r477  
    33using namespace itpp; 
    44 
    5 int main() 
    6 { 
    7   // Declare the it_file class 
    8   it_file ff; 
     5int main() { 
     6        // Declare the it_file class 
     7        it_file ff; 
    98 
    10   // Open a file with the name "it_file_test.it" 
    11   ff.open("it_file_test.it"); 
     9        // Open a file with the name "it_file_test.it" 
     10        ff.open ( "it_file_test.it" ); 
    1211 
    13   // Create some data to put into the file 
    14   vec a = linspace(1, 20, 20); 
     12        // Create some data to put into the file 
     13        vec a = linspace ( 1, 20, 20 ); 
    1514 
    16   // Put the variable a into the file. The Name("a") tells the file class 
    17   // that the next variable shall be named "a". 
    18   ff << Name("a") << a; 
     15        // Put the variable a into the file. The Name("a") tells the file class 
     16        // that the next variable shall be named "a". 
     17        ff << Name ( "a" ) << a; 
    1918 
    20   // Force the file to be written to disc. This is useful when performing 
    21   // iterations and ensures that the information is not stored in any cache 
    22   // memory. In this simple example it is not necessary to flush the file. 
    23   ff.flush(); 
     19        // Force the file to be written to disc. This is useful when performing 
     20        // iterations and ensures that the information is not stored in any cache 
     21        // memory. In this simple example it is not necessary to flush the file. 
     22        ff.flush(); 
    2423 
    25   // Close the file 
    26   ff.close(); 
     24        // Close the file 
     25        ff.close(); 
    2726 
    28   // Exit program 
    29   return 0; 
     27        // Exit program 
     28        return 0; 
    3029}