How to return more than one value from a function?
Answer Posted / ravivarman_r
Public Type Income
Wages As Currency
Dividends As Currency
Other As Currency
Total As Currency
End TypeYou can now use this structure as the return
type for a function. In a real situation, the function
would look up your database tables to get the values, but
the return values would be assigned like this:
Function GetIncome() As Income
GetIncome.Wages = 950
GetIncome.Dividends = 570
GetIncome.Other = 52
GetIncome.Total = GetIncome.Wages +
GetIncome.Dividends + GetIncome.Other
End FunctionTo use the function, you could type into
the Immediate Window:
GetIncome().Wages
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What is the difference between having clause and where clause?
What type of database is cloud sql?
what is index? : Sql dba
What is bind variable in pl sql?
define sql insert statement ? : Sql dba
What is a data definition language?
What is the difference between inner join and left join?
What is update query?
Why is %isopen always false for an implicit cursor?
Why we use cross join?
What is compute?
Can we rename a column in the output of sql query?
Can we perform dml in function?
Can we rollback truncate?
What is a primary key sql?