11-28-2023, 02:36 AM
Thing to remember is that passing via reference only works IF variable types match. For example, change the types from DOUBLE to _FLOAT in the program above.
Best practice, if one doesn't want values to pass by reference, is just to pass to temp variables.
SUB foo(tempX, tempY)
x = tempX: y = tempY
'Now use x/y with zero worry over changing your original variable values.
Best practice, if one doesn't want values to pass by reference, is just to pass to temp variables.
SUB foo(tempX, tempY)
x = tempX: y = tempY
'Now use x/y with zero worry over changing your original variable values.