Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How good is your memory?
Message
De
11/10/2001 17:55:10
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
How good is your memory?
Divers
Thread ID:
00567276
Message ID:
00567276
Vues:
41
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform