<br><font size=2 face="sans-serif">I'm getting an RT 216 error in a spot that seems it shouldn't be occurring, but it may just be me...</font>
<br>
<br><font size=2 face="sans-serif">I'm using FPC 1.1 dated 2001/06/19. The target is Win32, running on Windows 2000 Professional. I've included a small sample, so you can see what I'm referring to.</font>
<br>
<br><font size=2 face="sans-serif">The error occurs when I attempt to add a character to a string. Basically, I'm rewriting a program that uses readln to get data from a file. Some of the files are quite large, so I'd rather use blockread (which is faster). I read a block from the file, then scan the block starting from the first position. As the block is being scanned any character other then #10 and #13 (RETURN and LINEFEED) are ignored, while the rest are appended to a string variable. But I get the RT 216 on line 82 (according to -gl) when I try something like this:</font>
<br>
<br><font size=2 face="sans-serif">string [string_index] := block [block_index];</font>
<br>
<br><font size=2 face="sans-serif">If I use concat instead it works, but it's *much* slower:</font>
<br>
<br><font size=2 face="sans-serif">string := concat (string, block [block_index]);</font>
<br>
<br><font size=2 face="sans-serif">Now, in order to make certain that the string is empty before each iteration I use string := '' (an empty string, which is on line 73 of the attached file). Interestingly, if I change that line to string := ' ' (that's a single space between the quotes) I no longer get a 216 error, but all the strings display on the screen are just a single, seemingly random, character. Sigh...</font>
<br>
<br><font size=2 face="sans-serif">This seems like an FPC bug, but knowing me it's something I'm doing wrong. Maybe trying to "clear" a string using string := '' is wrong, but I don't recall that being a problem before.</font>
<br>
<br><font size=2 face="sans-serif">Anyway, TIA for any help you can give me.</font>
<br>
<br><font size=2 face="sans-serif">Jim</font>
<br>
<br>