Few ways to do this, none are really appealing.
1.
Make the variables where you want the answers to be global variables. Color1, Color2, etc as global vars. Then the autocolor function can set all of them. Not very elegant, but its easy.
2.
Slightly more elegant, but little harder. Make the autocolor procedure set the answers to variables of your choice.
SCAR Code:
procedure Autocolor (var answer1, answer2, answer3:integer);
begin
//do stuff
answer1:=stuff
etc
end;
autocolor(myvar1,myvar2,myvar3); will set the answers to those vars. Notice the var in the parameters. Findcolor/bitmap/dtms functions have this for the x,y location of the answer.
3.
Make it return a multiple branched type.
SCAR Code:
type 3Ints = record
First,Second,Third :integer;
end;
var
RockColors:3Ints;
function AutoColorRock (parameters):3Ints;
begin
dostuff
result.first:=stuff;
result.second:=otherstuff;
result.thrird:=morestuff;
end;
//main loop
begin
RockColors:=AutoColorRock(theparams);
writeln(inttostr(rockcolors.first));
writeln(inttostr(rockcolors.first));
If you don't understand the type stuff then don't worry about it.