Answer the question
In order to leave comments, you need to log in
The compiler swears at the function. What should I do?
Comrades!
The compiler swears at a function that should return an array of integers.
Really in Turbo Pascal function can return only standard data type??
function NewMassive(a:mass;x,y:integer):array [1..100] of integer;
var
i,c:integer;
b:mass;
begin
c := 1;
for i := x to y do begin
b[c]:= a[i];
c:=c+1;
end;
NewMassive := b;
end;
Answer the question
In order to leave comments, you need to log in
When there are two complex structures, you need to set parameters in a procedure, not a function. Because functions are used to return simple types.
Correct like this:
procedure Some(a: mass; var b: mass)
begin
end;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question