Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How good is your memory?
Message
From
11/10/2001 17:59:01
 
 
To
11/10/2001 17:55:10
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00567276
Message ID:
00567282
Views:
10
>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

My recollection is slightly different. The period is (for who knows what reason!), the concatenation operator in macro substitution. So, the first period marks the concatenation and the 2nd period the actual period separating table and field names.

Just using 1 period doesn't work because the period separator isn't included.
Previous
Reply
Map
View

Click here to load this message in the networking platform