Answer the question
In order to leave comments, you need to log in
How to call a procedure in Delphi console?
I have a procedure
procedure readListRobFromFile(var list : PLinkedListNode; var countOfTops, countOfRobs : integer);
var
fileName : String;
fileIn : TextFile;
n : integer
i : integer;
top1, top2 : integer;
head : PLinkedListNode;
begin
fileName := 'input.txt';
assign(fileIn, fileName);
reset(fileIn);
read(fileIn, countOfTops, countOfRobs);
new(list);
head := list;
for i := 0 to countOfRobs - 1 do
begin
read(fileIn, top1);
read(fileIn, top2);
addInList(list, top1, top2);
end;
list := head;
close(fileIn);
end;
I need to call it, I don't understand how to do it in the console, and what should I write in the values (a text file with a list of edges has been prepared)
Answer the question
In order to leave comments, you need to log in
1. We look at the simplest console program in Delphi.
code-man.narod.ru/delphi/console_app
It looks something like this
program Project2;
{$APPTYPE CONSOLE}
<<<<< вашу процедуру вставлять сюда
begin
<<<< а сюда вставлять вызов вашей процедуры
end.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question