# File lib/kirbybase.rb, line 2319
    def delete(&select_cond)
        raise ArgumentError, 'Must specify select condition code ' + \
         'block.  To delete all records, use #clear instead.' if \
         select_cond.nil?

        # Get all records that match the selection criteria and

        # return them in an array.

        result_set = get_matches(:delete, [:recno], select_cond)

        @db.engine.delete_records(self, result_set)

        # Return the number of records deleted.

        return result_set.size
    end