Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - mclose() close file buffers associated with a memo http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 mclose()            Close file buffers associated with a memo
------------------------------------------------------------------------------
 Declaration
   memo.hdr

 Syntax
   proc mclose extern
   param memo mMemoField

 Arguments
   mMemoField is the memo to operate on.

 Return
   None.

 Description
   The mclose() procedure closes the file buffers associated with the
   memo mMemoField.

   Data can be lost if a memo field is not closed before the record pointer
   is moved. When closed, all buffers associated with the memo are
   flushed and therefore any changes in the memo field are reflected in
   the memo file.

   The Force library supports up to 255 open files at one time. Use the
   procedure morehandles() to allocate more DOS file handles.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   proc InsertLine
   param alias sDbf, memo memofield, const char cText
   // Place text in the memo field of every records
   !sDbf go top
   do while .not. aeof( sDbf )
      mopen( memofield, MO_APPEND )
      mputln( memofield, cText )
      mclose( memofield )
      !sDbf skip
   enddo
   endproc
   
   proc Test_mclose
   open sTest
   InsertLine( sTest, sTest->notes, "--Industry Co.--" )
   endproc

   proc main
   Test_mclose()
   endproc

See Also: mopen() morehandles()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson