<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Somebody help, this is a question of the teoretical
type.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Here the scenario:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>i have a text with line diffenrenting like
this:</FONT></DIV>
<DIV><FONT face=Arial size=2>AAA</FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial size=2>AAA</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial size=2>AAA</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial size=2>AAA</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial size=2>AAA</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial size=2>AAA</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial size=2>AAA</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial size=2>AAA</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2>AAB</FONT></DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>AAB</FONT></DIV>
<DIV>
<DIV><FONT face=Arial size=2>AAB</FONT></DIV>
<DIV>
<DIV><FONT face=Arial size=2>AAB</FONT></DIV>
<DIV>
<DIV><FONT face=Arial size=2>AAB</FONT></DIV>
<DIV> </DIV>
<DIV>....and so on.</DIV>
<DIV> </DIV>
<DIV>I want to split up the values in different files so that all the AAA are
put in the file AAA, and all AAB are put in AAB etc.</DIV>
<DIV> </DIV>
<DIV>look at my rutine and tell what im doing wrong. I can tell the program when
i shouldt start with a new file, and writing a new line </DIV>
<DIV>but i can't get it to close the file, when the sequence stops.</DIV>
<DIV> </DIV>
<DIV> begin<BR>
readln(asc_file,buffer);<BR>
inc(cell_count);<BR>
strPcopy(file_array,buffer);</DIV>
<DIV> </DIV>
<DIV> file_check :=
'';<BR> for i := 2 to 4 do
begin<BR> file_check :=
file_check + file_array[i];<BR> end;</DIV>
<DIV> </DIV>
<DIV><BR> if (file_check <> old_file_check)
then<BR>
begin<BR> igang :=
true;<BR>
writeln('start');<BR>
readln;<BR> end;</DIV>
<DIV> </DIV>
<DIV> if (file_check = old_file_check)
then<BR>
begin<BR>
writeln('Linie');<BR> end;</DIV>
<DIV> </DIV>
<DIV><BR> if (file_check = old_file_check) and
(igang = true) then<BR>
begin<BR> igang :=
false;<BR>
write('Slut');<BR>
readln;<BR> end;</DIV>
<DIV> </DIV>
<DIV><BR> old_file_check :=
'';<BR> old_file_check :=
file_check;<BR> file_check := '';</DIV>
<DIV> </DIV>
<DIV> end;<BR></DIV>
<DIV> </DIV>
<DIV>This is only an example... so of...</DIV>
<DIV> </DIV>
<DIV>Hope some on can help me!</DIV>
<DIV> </DIV></DIV></DIV></DIV></FONT></DIV></BODY></HTML>