Add Papers Marked0
Paper checked off!

Marked works

Viewed0

Viewed works

Shopping Cart0
Paper added to shopping cart!

Shopping Cart

Register Now

internet library
Atlants.lv library
FAQ
1,99 € Add to cart
Add to Wish List
Want cheaper?
ID number:458474
 
Author:
Evaluation:
Published: 01.06.2009.
Language: Latvian
Level: College/University
Literature: n/a
References: Not used
Extract

1. Darba uzdevums
Apgūt elementāras TEXT failu apstrādes darbības. Programmā ievadīt Text failu, veikt tā
apstrādi un apstrādes rezultātus izvadīt citā TEXT failā. Ja ievades failā rinda beidzas as
vārdu „END” vai „end”, tad atlikušo faila daļu neapstrādāt.
2. Risinājuma principi
1. Nosakām programmai nepieciešamos mainīgos.
2. Ievada faila vārdu nosakām kā simbolu konstanti CONST inFileName='Lab1Inp.txt';
3. Izvada faila vārdu ievadīsim katru reizi izpildot programmu.
4. Saistām ievada un izvada loģiskos failus ar failiem uz diska.
5. Apstrādi veicam ieslēdzot izpildāmos operatorus WHILE tipa ciklā. Cikla ķermenī
ievietosim failu apkalpošanas operatorus, simbolu rindas apstrādes operatorus un datu
izvades operatorus procesa vizuālai kontrolei uz ekrāna.
while (not eof(inFile)) do
begin
readln(inFile, inString);
outString:=processedSrting(inString); writeln(outString);
writeln(outFile, outString);
if ((copy(inString,length(inString)-2,3) = 'end') OR
(copy(inString,length(inString)-2,3) = 'END')) then
begin
writeln;
writeln('Processing stopped because of ''END'' or ''end''.');
{$I-}
close(inFile);
close(outFile);
{$I+}
if ioresult <> 0 then
begin
writeln('Error #', ioresult, ' while closing the files.');
write('Press any key to exit');
key:=readkey;
exit;
end;
write('Press any key to exit');
key:=readkey;
exit;
end;
end.…

Author's comment
Load more similar papers

Atlants

Choose Authorization Method

Email & Password

Email & Password

Wrong e-mail adress or password!
Log In

Forgot your password?

Draugiem.pase
Facebook

Not registered yet?

Register and redeem free papers!

To receive free papers from Atlants.com it is necessary to register. It's quick and will only take a few seconds.

If you have already registered, simply to access the free content.

Cancel Register