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 - mexist() determine if a memo exists for the current record http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 mexist()            Determine if a memo exists for the current record
------------------------------------------------------------------------------
 Declaration
   memo.hdr

 Syntax
   func logical mexist extern
   param memo mMemoField

 Arguments
   mMemoField is the memo to operate on.

 Return
   A logical indicating if the memo exists.

 Description
   The mexist() function returns .t. if mMemoField exists for the current
   record of the active database. Use mexist() to determine whether a memo
   should be created when it is opened, or opened for appending.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   proc Test_mexist
   open sTest
   go top
   ? recno(), mexist( sTest->notes ) // memo exists for record 1
   go bottom
   ? recno(), mexist( sTest->notes ) // memo exists for record 100
   append blank                      // add a new record
   ? recno(), mexist( sTest->notes ) // memo does not exist for record 101
   mopen( sTest->notes, MO_CREATE )
   mputln( sTest->notes, "new notes" )  // add memo
   mclose( sTest->notes )
   ? recno(), mexist( sTest->notes ) // memo exists for record 101
   endproc

   proc main
   Test_mexist()
   endproc

See Also: mopen()

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