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 - deleted() return the deleted status of the current record http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 deleted()           Return the deleted status of the current record
------------------------------------------------------------------------------
 Declaration
   database.hdr

 Syntax
   func logical deleted extern

 Arguments
   None.

 Return
   A logical indicating if the current record in the selected workarea
   is deleted.

 Description
   The deleted() function returns .t. if the current record is marked for
   deletion in the current alias.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   proc Test_deleted
   vardef
      char cYesNo
   enddef
   open sTest
   delete                      // delete a record
   ? deleted()                 // prints .t.
   recall                      // recall (undelete) the record
   ? deleted()                 // prints .f.
   
   // verify records to be deleted before packing
   ?
   goto top
   delete // delete a record
   do while .not. eof()
      if deleted()
         ? "Record to be deleted", sTest->lastname
         wait "Are you sure? (Y/N)" to cYesNo
         if cYesNo $ "Nn"
            recall
         endif
      endif
      skip
   enddo
   pack
   endproc

   proc main
   Test_deleted()
   endproc

See Also: adeleted() delete pack recall set delete

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