Can a Function return two values ..
for a auto color function i need to reurn turn the x and y's for the found color ..
i've tried puting return:= MSCX,MSCY but i dosent work ..
i need it to retturn something like ..124,321
X Y
Can a Function return two values ..
for a auto color function i need to reurn turn the x and y's for the found color ..
i've tried puting return:= MSCX,MSCY but i dosent work ..
i need it to retturn something like ..124,321
X Y
function a: TPoint;
begin
Result.x := x;
Result.y := y;
end;
Or for more.
Etc.Simba Code:function Func : array [0..1] of integer;
begin
result := TIntegerArray([2, 3]);
end;
But for 2 value results just use the TPoint method mentioned above.
Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
Originally Posted by #srl
"A programmer is just a tool which converts caffeine into code"
Simba Code:function test(const varIn: Integer; out Result1: string): Integer;
begin
end;
Would be the formal way to return multiple variables![]()
Isn't out like almost the same as var?
Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
Originally Posted by #srl
"A programmer is just a tool which converts caffeine into code"
There are currently 1 users browsing this thread. (0 members and 1 guests)