Advertisement
believe_me

Untitled

May 18th, 2022
2,041
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. procedure deleteSubscriber(NumberOfSubscriber: TNumber);
  2. const
  3.     DELETER: ansichar = '/';
  4. var
  5.     SourceFile: TBinaryFile;
  6.     Offset: integer;
  7.     NumberOfRecord: LongWord;
  8.     ArrayOfRecordNumber: TNumber;
  9.     DeleterArray: array[1..RECORD_SIZE] of ansichar;
  10. begin
  11.     fillchar(DeleterArray, RECORD_SIZE, DELETER);
  12.     assign(SourceFile, getCurrentDir + '\' + FILE_NAME);
  13.     reset(SourceFile);
  14.     Offset := NumberOfSubscriber * RECORD_SIZE;
  15.     seek(SourceFile, Offset);
  16.     blockWrite(SourceFile, DeleterArray, RECORD_SIZE);
  17.     closeFile(SourceFile);
  18. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement