1
I did this algorithm on Pascal that feeds numerical information into a text file.
program Pascal;
var
i:integer;
Vect:array[1..1001] of integer;
Myfile: text;
begin
i:=1;
for i:=1 to 999 do
vect[i]:=i+1;
Assign(Myfile, 'Myfile.txt');
Rewrite(MyFile);
for i:=1 to 999 do
begin
WriteLn(vect[i]);
WriteLn(Myfile, vect[i]);
End;
Close(Myfile);
ReadLn;
End.
I needed an idea for another program that, once this text file was fed, automatically the program would add the current date for each row that was inserted.
I’m not asking for the code or the program already prepared. Just an idea of how to use the Assign, For example, or maybe using a file .bat. I don’t know.
I am learning programming logic but I have no knowledge of some tools of each language, as in this case, an interaction between files or programs.
You want each number to be inserted next to the time it is being inserted?
– DH.
That. Every N characters or N lines (whatever) the date and time
– h1k3r