Why does the PBMain allow use of "y=2", when it y is declared as "y&", but the subroutine does not? It appears that when an argument is declared with a type specifier, the variable in the procedure must use it too.
Is there a logical reason for this?
Is there a logical reason for this?
Code:
#Compile Exe #Dim All Function PBMain () As Long Local y&, z As Long y = 2 'works z& = 2 'works Test(2) MsgBox "Success" End Function Sub Test(y&) Local z& y = 2 'fails z = 4 'works End Sub
Comment