Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How good is your memory?
Message
 
 
To
11/10/2001 17:55:10
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00567276
Message ID:
00567280
Views:
11
Craig is correct. The first dot indicates the end of the expansion while the second dot is interpretted as an actual dot.

>Hi all,
>
>Hey everyone... We were having a discussion with a junior programmer about macro expansion and the topic of usung double dots came up. Actually discovered this quite by accident and I had to admit that while using double dots has been around for ages I couldn't remember all of the reasons and justifications for its implementation.
>
>For example:
>
>Temporary cursor named "cResults" containing fields named "cXML1", "cXML2" & "cXML3".
>
>Well, I pointed out to Jeff that you could do something like this:
>
>cDBF = alias() && cResults
>cField = "cXML" + alltrim(str(nLoop)) && 1, 2 & 3
>
>and then do this:
>
>? &cDBF..&cField and you'd get the proper field.
>
>For the life of me I can't remember the reason we needed to use double dots but after talking to Craig Berntson he suggested that one might indicate the end of a macro expansion and the second dot was interpreted as the 'normal' dot used when referring to a table plus field.
>
>This seems the most accurate but I was wondering if any of you old timers <g> might remember anything additional to this.
>
>This also works for situations like "THISFORM.&cTextbox..value" which would also make sense, given the presumption above.
>
>Thoughts??
>
>Best,
>
>DD
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform