Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure write(SubscriberIndex: TNumber; TelephoneNumber: TTelephoneNumber;
- Surname: TSurname; Name: TName; FatherName: TPatronymic;
- City: TCity; DateOfPay: TDateOfPay);
- var
- SourceFile: TBinaryFile;
- ArrayOfRecordNumber: TNumber;
- begin
- assign(SourceFile, getCurrentDir + '\' + FILE_NAME);
- reset(SourceFile);
- seek(SourceFile, START_SUBSCRIBER_OFFSET + SubscriberIndex * RECORD_SIZE);
- blockWrite(SourceFile, SubscriberIndex, NUMBER_LENGTH);
- blockWrite(SourceFile, TelephoneNumber, TELEPHONE_NUMBER_LENGTH);
- blockWrite(SourceFile, Surname, SURNAME_LENGTH);
- blockWrite(SourceFile, Name, NAME_LENGTH);
- blockWrite(SourceFile, Fathername, PATRONYMIC_LENGTH);
- blockWrite(SourceFile, City, CITY_LENGTH);
- blockWrite(SourceFile, DateofPay, DATE_OF_PAY_LENGTH);
- closeFile(SourceFile);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement