Greetings,
First of all, I'm not exaclty sure if what I'm trying to do is possible.
In fact, I want to convert into a string, a specific part of a text file ( per example : only the characters between 50-55) and after that write that string [I mean : writeln(thestring);]
Please note, that I do not know that specific part of the text file, and I am not looking for a specific string in the text neither, what I really need is to get a specific part of the text into a string, and in order to get that specific part I only know its placement in the txt file (the line, and placement in the line, even if I don't want to copy the whole line, only that specific part of the line)
I've tried a few things so far. I converted the whole txt file into a string :
...
var
ikstring, two : string;
lk : text
...
assign(ik, ikstring );
reset(lk);
repeat
readln(lk, two);
until eof(one);
After this I tried to use a function to copy only a part of the "two" string :
function copy(two : string ;index:integer;count:integer) : string;
begin
two := copy(two, 5, 9);
writeln(two);
readln;
end;
It does not work, since I have to start with the function at the very beginning, and I only need in the middle of program.
I've also tried to create a "label" and to "goto" the program directly to the code of the function when it is actually needed, but since the function and the main program codes are separated it didn't work out.
Thank you guys in advance, it's starting to seem impossible for me to do this :p
P.S: I'm using win os, just noticed now I wrote on general and not on the win os section and I cannot delete the post. Sorry for that.