Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TEXT ENDTEXT and code block logic
Message
De
25/06/2007 15:04:28
 
 
À
25/06/2007 15:00:02
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01235422
Message ID:
01235442
Vues:
19
>>>>>This is at the top of a PRG. Anyone know what it is doing? I can't find references to TEXT ENDTEXT, and I think that the block would never be run with the IF .F. statement, but I'm not sure. Any clarity appreciated. Thanks!
>>>>>
>>>>>
>>>>>IF .F.
>>>>>   TEXT
>>>>>      Blah, blah, blah...
>>>>>   ENDTEXT
>>>>>ENDIF
>>>>>
>>>>
>>>>This is a simple way to include a lot of comments without getting any errors.
>>>
>>>Ok, but could you break it down further? What are the IF and TEXT statements doing here?
>>
>>If .F. is there to make sure that the code is never run. The Text-endtext syntax is used because everything between text and endtext is treated as text, so VFP will not try to compile it, which would create an error.
>>
>>If the if .f. confuse you, you could as well have written
>>Text to yourneverusedvariable
>>  Blah blah blah
>>Endtext
>>The only difference is that in this case you would spend some resources for a memvar you don't need.
>
>Ahhh... Ok, that makes sense. The only reference to TEXT I find in the VFP Help is for _TEXT or .Text with regards to objects/forms. Is this documented and I just don't see it?

Typing Help TEXT is not very helpful, just like Help Select will not show any SQL Select topics, which is extremely annoying. Anyway, open help, select the Index tag, and see the TEXT ... ENDTEXT command
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform