Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Something strange with header files
Message
De
20/03/2015 16:59:34
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Something strange with header files
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
SAMBA Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01617037
Message ID:
01617037
Vues:
43
Hi

This is FYI

Something nice. It's obscure.

Some games with a constant declaration that might be defined - or not

if defined it is like
#DEFINE StrangeDefine 'Mypath'+
so you understand how it is supposed to work if defined.

note: this will run via codeexecution, but it will not compile as prg

Program1
#IFDEF StrangeDefine
*anything here should not be compiled, because we never defined StrangeDefine
 #IF DIRECTORY(StrangeDefine '')  &&Will be processed during compile
  #DEFINE SomethingElse
*w/o next line compile will fail too, even if # IFDEF returns false
 #ENDIF
#ENDIF
I do not need help, I simply move the def of StrangeDefine around like

Program2
#IFDEF StrangeDefine
 #DEFINE StrangeDefine_found .T.
#ELSE
 #DEFINE StrangeDefine_found .F.
 #DEFINE StrangeDefine
#ENDIF

*.......

#IF StrangeDefine_found
*now it is still not used but compiles
 #IF DIRECTORY(StrangeDefine '')  THEN
  #DEFINE SomethingElse
 #ENDIF
#ENDIF

*.......

#IF !StrangeDefine_found
 #UNDEF StrangeDefine
#ENDIF
#UNDEF StrangeDefine_found
Lutz
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Répondre
Fil
Voir

Click here to load this message in the networking platform