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


DD

A man is no fool who gives up that which he cannot keep for that which he cannot lose.
Everything I don't understand must be easy!
The difficulty of any task is measured by the capacity of the agent performing the work.
Next
Reply
Map
View

Click here to load this message in the networking platform