InstallShield 2013 ยป InstallScript Language Reference
You can use the return statement to return a value from a user-defined function (if the function prototype does not specify a return type of void). When a return statement is encountered, program flow returns to the point at which the function was called. When used to return from a call to a user-defined function, the return statement can return a specified value to the caller.
The return value of most built-in functions will be either 0 (zero), indicating the success of the function, or a value less than zero (< 0), indicating failure. You can assign a number to the return value by using a return statement above the end statement in the function block, as shown below:
return -1;
end;
This attribute allows you to return the value of a local variable to the caller, even though the local variable itself is destroyed:
function MyFunction(ParamOne, ParamTwo)
NUMBER nNumber;
begin
nNumber = (ParamOne + ParamTwo);
// . . .
return nNumber;
end;
InstallShield Help LibraryJune 2013 |
Copyright Information | Contact Us |