Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Storing/assigning a value by reference
Message
From
08/04/1999 23:05:57
 
 
To
08/04/1999 22:03:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00206498
Message ID:
00206765
Views:
18
>>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
Map
View

Click here to load this message in the networking platform