General information
Category:
Coding, syntax & commands
>>Do the assignment operator ("=") and the STORE command assign values to variables/properties by reference or by value? I've been told by a VB user that the SET command in VB assigns values by reference and I need to duplicate this in VFP when assigning values to their particular ActiveX object's properties.
>>
>>And what about the _Store() API function? Can anyone post an example of how to use this and is it different than using either "=" or STORE?
>
>It might be because I'm a relatively green programmer, but I have never even heard the terms by value and by reference used with variable assignents, only with parameter passing.
>
>If assigning a variable by reference, are you implying that the following would be true in VB?
>
>SET a = 1
>SET b = a
>SET a = 2
>
>?b && displays 2
>
>For the life of me, this is all I could figure that storing a variable by reference could do. Otherwise, I think your VB programmers friend is confused.
>
>PS, STORE does the same thing as =.
No.. he is saying that you have TWO variables that point to the same variable...
For example...
A = @B (By Reference)
Change A or B and both A and B chang to that value. This is mostly a c thing, since you can define if a 'variable' is a pointer.
BOb
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only