home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
ozogan
/
CUSTOMER.IPS
< prev
next >
Wrap
Text File
|
1997-07-13
|
1KB
|
50 lines
TYPE
customerRecord = RECORD
key firma : string;
mesto : string;
ENDRECORD
ENDTYPE
VAR
customer : customerRecord;
query : customerRecord;
customerTable : TABLE of customerRecord;
ENDVAR
PROCEDURE main
ConsoleClear;
customer.firma := 'OZOGAN';
customer.mesto := 'Liberec';
writeRecord(customerTable, customer);
customer.firma := 'SH PLUS';
customer.mesto := 'Liberec';
writeRecord(customerTable, customer);
customer.firma := 'G COMP';
customer.mesto := 'Praha';
writeRecord(customerTable, customer);
WRITELN('--- > zßznamy v tabulce p°ed aktualizacφ <---');
forEachRecord(customerTable, query, 'printCustomerInfo');
saveTable(customerTable, 'CUSTOMER.DTA');
WRITELN('--- > zruÜenφ zßznamu <---');
customer.firma := 'SH PLUS';
setKeysFromRecord(customerTable, customer);
deleteRecord(customerTable);
query.firma := 'SH PLUS';
setKeysFromRecord(customerTable, query);
IF (readRecord(customerTable, query))
printCustomerInfo;
ELSE
WRITELN('Zßznam "' + query.firma + '" nebyl nalezen');
ENDIF
WRITELN('--- > zßznamy v tabulce po aktualizaci <---');
forEachRecord(customerTable, query, 'printCustomerInfo');
ENDPROC
PROCEDURE printCustomerInfo;
WRITELN(query.firma, ', ', query.mesto);
ENDPROC