home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 June
/
PCWorld_1998-06_cd.bin
/
software
/
Programy
/
Ozogan
/
CUSTOMER.IPS
< prev
next >
Wrap
Text File
|
1998-03-25
|
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;
ConsoleShow;
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