Neil, Without the code example no one would rally be able to help you. I assume that your code is encapsulated in a Try / Except clause and if so do you get any exception when the last line is missing? Also do you after you have read the PCL data in to the TStringList validate that the TStringList includes the correct numbers of lines with the correct numbers of characters before you start painting dots?
Bjarne Coordinate your email-newsletters with NTS eBlast tool suite http://www.go2nts.com/eblast -----Original Message----- From: n...@nrbs.com To: Delphi request <delphi@elists.org> Sent: Sat, Jun 4, 2011 1:41 am Subject: Strange loop behaviour [repeat loop] Hi I have a program that reads PCL data and converts to bitmaps. am using a stringlist for this data. I read the strings and convert hem to binary, loop through the binary lines and draw black pixels or 1s and white pixels for 0s. The program works and is very fast. However, sometimes the LAST ine is skipped when converting to dots. I have created a strings object where I write each line of data just fter convertion to dots. This registers correctly so I know that my ata is not corrupt when the routine reads the strings. Typically, there are between 3 and 40 lines for each character nd each line contains around 36 elements of 1s or 0s. I have checked all initial values before drawing on the bitmap anvas using canvas.fillrect. The problem is this error only happens sometimes, [but always he same files]. I have checked these files using a hex editor and he data is definitely present. Any thoughts would be extremely welcome. Thanks in advance Neil ______________________________________________ elphi mailing list el...@elists.org ttp://lists.elists.org/cgi-bin/mailman/listinfo/delphi _______________________________________________ Delphi mailing list Delphi@elists.org http://lists.elists.org/cgi-bin/mailman/listinfo/delphi