Forum: Programmieren allgemein
by scp,
24. Jul 2004
My example was especially for the case you described: You said, yo don't know if there are more than 3 spaces.
To your question:
Buffer: array of char;
buffer2: array of char;
After writing to the buffer, you should use
Forum: Programmieren allgemein
by scp,
24. Jul 2004
You can search for 'AddD ' (If it has not less but more than 3 spaces) then you should read the data into a buffer and find out the postion of the version number if you compare the chars until it is <> ' '.
ThePos := FindInFile('D:\_ftest.txt', 'AddD ', true);
fs := TFileStream.Create;
try
fs.Seek(ThePos + length('AddD '), soFromBeginning);
fs.ReadBuffer(Buffer,...
Forum: Programmieren allgemein
by scp,
24. Jul 2004
Idx begins with value 1.
So if all Chars are matched Idx has a value of Length(SearchWord)+1
Declare the If-Statement like this:
if (idx = Length(SearchWord)+1) then
begin
Forum: Programmieren allgemein
by scp,
24. Jul 2004
It should be shl 4 not shr 4