Argument passing regarding ivars
- by StoneBreaker
I am passing an iVar into a function. The iVar is a double. The value of the iVar inside the function is correct, but the value of the iVar outside the function is not changed. This must have something to do with the way that I am receiving the iVar into the function. How do I pass a double iVar in so that its value is changed in the object and not only in the function?
I do the same thing with pointers and the results are as expected, so I think I am not understanding scalar argument passing in c/objective-c.