N
Nathan
Hello,
I have a function that reduces a fraction to lowest terms, storing the
fraction in an integer array called Answer().
\\
Public Function Reduce(ByVal Numerator As Double, ByVal Denominator As
Double) As Integer
Dim Answer(2) As Integer
....
'Code here
....
Answer(1) = CInt(Numerator / b)
Answer(2) = CInt(Denominator / b)
Return Answer()
End Function
\\
(I use only Answer(1) and Answer(2) here, as Answer(0) is used for another
value elsewhere)
I'm having problems with the last line - Return Answer(). I don't know what
to put there to get it to return the entire array. Everything I put seems
to bring up red squiglies.
Here is how the function is called (in a separate class):
\\
Dim Numerator, Denominator as Integer
Dim Answer(2) as Integer
Answer(2) = Reduce(Numerator, Denominator)
\\
What do I need to Return so that I get both Answer(1) and Answer(2)?
Thanks in advance.
I have a function that reduces a fraction to lowest terms, storing the
fraction in an integer array called Answer().
\\
Public Function Reduce(ByVal Numerator As Double, ByVal Denominator As
Double) As Integer
Dim Answer(2) As Integer
....
'Code here
....
Answer(1) = CInt(Numerator / b)
Answer(2) = CInt(Denominator / b)
Return Answer()
End Function
\\
(I use only Answer(1) and Answer(2) here, as Answer(0) is used for another
value elsewhere)
I'm having problems with the last line - Return Answer(). I don't know what
to put there to get it to return the entire array. Everything I put seems
to bring up red squiglies.
Here is how the function is called (in a separate class):
\\
Dim Numerator, Denominator as Integer
Dim Answer(2) as Integer
Answer(2) = Reduce(Numerator, Denominator)
\\
What do I need to Return so that I get both Answer(1) and Answer(2)?
Thanks in advance.