I have two integers that will be examined (A, B). If A = 1, 2, 3... etc then I need to have a set of procedures for B if it's 1, 2, 3... etc.
I know that I can use a different set of if statements for each variety of A that handles each variety of B. Such as:
Code:
Function Rate (A as integer, B as integer) as Integer
if A = 1 then
if B = 1 then
Rate = 1
else if B = 2 then
Rate = 5
else if ... etc
else if A = 2
...
end if
Is it possible to use Select-Case statements instead? Such as:
Code:
Function Rate (A as integer, B as integer) as integer
Select Case A
Case A is = 1
Select Case B
Case B = 1
Rate = 1
Case B = 2
Rate = 5
End Select ' End B Case
....
Case A = 2
....
End Select 'End A Case