I
Ian Stanborough
Hope some one can help
My problem is when I try to create a function that will increment an
integer, the calling parameter I believe is passed as a value and not a
reference. The help file suggest that default value of parameters passed is
ByRef, but this example tell me in the case of integer its not.
Does any one have a work around.
My email address is (e-mail address removed)
All suggests are welcomed. A coded example would explain all
Program
dim myValue as integer
.....
myValue = 0
increment(myValue)
' here myValue still has value of 0, because it was not passed to
subroutine as reference and hence not incremented
....
end Program
sub increment( number as integer)
number = number + 1
end sub
My problem is when I try to create a function that will increment an
integer, the calling parameter I believe is passed as a value and not a
reference. The help file suggest that default value of parameters passed is
ByRef, but this example tell me in the case of integer its not.
Does any one have a work around.
My email address is (e-mail address removed)
All suggests are welcomed. A coded example would explain all
Program
dim myValue as integer
.....
myValue = 0
increment(myValue)
' here myValue still has value of 0, because it was not passed to
subroutine as reference and hence not incremented
....
end Program
sub increment( number as integer)
number = number + 1
end sub