I have a problem with a tab delimitered file.
I have created a file this way
temp := a String var + #9 + a string var + #9 + a string var and so on
Writeln(File, temp)
readln(File,lineIn);
the problem occours when I try the x := pos ('#9', lineIn) it allways
returns x = 0 even thoug the the first characters gives a string.
how can i count the numbers of tabs in each line??
Course I ned to know the numbers.
TIA
Allan
function CountTabChars (const s : string) : integer;
var i : integer;
begin
result := 0;
for i := 1 to Length (s) do
begin
if s [i] = #9
then inc (result);
end;
end;
Are you using x := pos('#9',lineIn) or x := pos(#9,lineIn)? The second
syntax
should work while the first will not...