Advertisement
believe_me

Untitled

May 18th, 2022
1,421
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. procedure write(SubscriberIndex: TNumber; TelephoneNumber: TTelephoneNumber;
  2.                                     Surname: TSurname; Name: TName; FatherName: TPatronymic;
  3.                                   City: TCity; DateOfPay: TDateOfPay);
  4. var
  5.     SourceFile: TBinaryFile;
  6.     ArrayOfRecordNumber: TNumber;
  7. begin
  8.     assign(SourceFile, getCurrentDir + '\' + FILE_NAME);
  9.     reset(SourceFile);
  10.     seek(SourceFile, START_SUBSCRIBER_OFFSET + SubscriberIndex * RECORD_SIZE);
  11.     blockWrite(SourceFile, SubscriberIndex, NUMBER_LENGTH);
  12.     blockWrite(SourceFile, TelephoneNumber, TELEPHONE_NUMBER_LENGTH);
  13.     blockWrite(SourceFile, Surname, SURNAME_LENGTH);
  14.     blockWrite(SourceFile, Name, NAME_LENGTH);
  15.     blockWrite(SourceFile, Fathername, PATRONYMIC_LENGTH);
  16.     blockWrite(SourceFile, City, CITY_LENGTH);
  17.     blockWrite(SourceFile, DateofPay, DATE_OF_PAY_LENGTH);
  18.     closeFile(SourceFile);
  19. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement