Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calvin Hsia's blog and VFP tools
Message
From
19/12/2004 17:44:54
 
 
To
19/12/2004 15:04:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00969652
Message ID:
00970456
Views:
40
>PMFJI, I think that a SET or SYS() setting to determine memvar accesses would require some major overhaul to the VFP code base. The fact is that VFP ALWAYS looks for a field with the referenced name FIRST, so there is no way to resolve an ambiguous reference to favor the memvar when you have a visible field and variable with the same name without using Mdot. Otherwise it would require changing this lookup method that is and has always been an intrinsic part of VFP.
>
>IF you had a sys function that says that memvars are not to be referenced by M., then for that to really work in the case of ambiguous field/variable reference, it would have to allow the variable to take precedence over the field in those cases. That would then be just the reverse of the situation that exists now and in order to access a field, you would have to prefix it with the alias name.
>

Hi Elmer,

this SET or SYS it makes the opposite one.

If active this new setting in VFP:
?  xx && search on fields only
?  m.xx && search on memvar only 
This modality is compatible with the current programs
(now you cannot use m.fieldname where m it is a alias),
only forces the developer to insert m. for get a variable value.

It exists an incompatible situation,
but i think that nearly nobody uses it:
to use the value of a variable one in the case not is a field with the same name.

A way soft to use it:
active it in development phase,
therefore it has been guaranteed that all the variable ones are not ambiguous,
and disable it to runtime.

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform