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 - delete mark database records for deletion http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 delete              Mark database records for deletion
------------------------------------------------------------------------------
 Syntax
   [!sAlias] delete [all] [while lExp] [for lExp]

 Arguments

 Description
   The delete command marks specified records within the specified scope for
   deletion.

   The default scope of delete is the current record. delete does not
   physically remove the specified records from the database. When set delete
   is on, seek, skip, goto top and goto bottom ignore deleted records,
   but goto will go to the deleted record regardless of the set delete flag.

   Use recall to retrieve a deleted record again. Use pack to physically
   remove all deleted records from the database.

   delete does not affect areccount() or reccount(), which always return
   the number of physical records in the database.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   proc Test_delete
   vardef
      ulong nRecs
   enddef
   open sTest        // open database
   !sTest delete all for sTest->firstname = "Joe" // delete all Joes
   set delete off    // all records are visible
   count to nRecs    // count visible records
   ? nRecs           // prints total record count
   set delete on     // deleted record become non-visible
   count to nRecs    // count visible records
   ? nRecs           // prints record count less number of Joes
   ? reccount()      // prints original record count
   !sTest pack       // eliminate deleted records
   ? reccount()      // prints new record count
   endproc

   proc main
   Test_delete()
   endproc

See Also: deleted() pack recall set delete

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