cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
yozturk
Level 4

How to return more than one value from a function?

Hi,

I want to return more than one values from a custom InstallScript function.

For example, I calculate two values inside a function and I want to return both of them. Is there a way?

i.e.

function Div(dividend, divisor)
begin
....// Calculate quotient and remainder
....return quotient;
....return remainder;
end;

-Best regards.
-Yavuz
Labels (1)
0 Kudos
(3) Replies
RobertDickau
Flexera Alumni

You might look into using the BYREF operator to specify arguments you can modify in place (similar to how, for example, SdRegisterUser "returns" the two strings entered by the user).
0 Kudos
foerdi
Level 4

This is MSI, so easiest way would be using properties?
0 Kudos
yozturk
Level 4

Thanks a lot RobertDickau,

BYREF keyword is EXACTLY what I was looking for 🙂

-Best regards.
-Yavuz
0 Kudos