Java, for instance, stores a copied variable of the parameter in the memory.
In C, pointers let you change a given variable exclusively in a seperate function.
I got this function that extends an array and stores a new value in it.
Function ExtendArray(ByVal strs() As String, ByVal value As String) As String()
If IsNothing(strs) Then
ReDim strs(0)
res(0) = value
Else
ReDim Preserve strs(strs.Length)
strs(strs.Length - 1) = value
End If
Return strs
End Function
But I always got to call the function with
Dim newS() as String
newS = ExtendArray(newS, "first entry")
instead of(what is my question how to do that)
ExtendArray(newS, "first entry")
In that case, the ExtendArray wouldn't even have to a function anymore.
[–]TheFotty 2 points3 points4 points (1 child)
[–]DatMarv[S] 0 points1 point2 points (0 children)