flush



Summary

#include <dataman/dataman.h>

flush();

Description

The flush function flushes the contents of both the current work and master records to their respective files. The records remain in memory after the call. The main purpose is to force an update of the disk file before it would normally happen. The most common use of this is at the end of a function, or program. If flush is not called the last accessed record may never be updated in it's file.

Example

    #include <dataman/dataman.h>

    main(int argc, char *argv[])
    {

        short int row,col;    /* row and col to read */
        char input[5];        /* read buffer */
          ...
        accept(row,col,input,UPPER) else {
            flush();          /* flush the record */
            return;           /* return to main menu */
        }
    }

«previous  next»