Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
#IF...#ENDIF And Image Locations
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01232067
Message ID:
01232316
Vues:
14
Ok, I see the issue here. How's this look now:
#DEFINE RUNTIME              EMPTY(VERSION(2))

#DEFINE IMAGE_LOC_RUNTIME    ADDBS(SYS(5) + SYS(2003)) + "Graphics\"
#DEFINE IMAGE_LOC_DEV        ADDBS(SYS(5) + SYS(2003)) + "Media\"

#DEFINE IMAGE_LOC_BASE       IIF(RUNTIME, IMAGE_LOC_RUNTIME, IMAGE_LOC_DEV)

#DEFINE IMAGE_LOC_EFFECTS    IIF(RUNTIME, IMAGE_LOC_BASE, IMAGE_LOC_BASE + "Effects")
#DEFINE IMAGE_LOC_QA         IIF(RUNTIME, IMAGE_LOC_BASE, IMAGE_LOC_BASE + "Toolbars")
#DEFINE IMAGE_LOC_ARROWS     IIF(RUNTIME, IMAGE_LOC_BASE, IMAGE_LOC_BASE + "Arrows")
>Hi Gregory,
>
>Right you are. Check for runtime/dev has to be performed during excution not during compilation. Thanks for catching it.
>
>>
>>I do not think this will work. Once it's compiled, it's compiled. Running the compiled code on a 'runtime' will not recompile
>>
>>I'd rather go for something similar to this, to make sure the expression is reevaluated (IMAGEPATHNEEDED)
>>
>>#define RUNTIME  empty(Version(2))
>>
>>#DEFINE IMAGE_LOC_RUNTIME	ADDBS(SYS(5) + SYS(2003)) + "Graphics\"
>>
>>#DEFINE IMAGE_LOC_DEV_EFFECTS	IMAGE_LOC_BASE + "Effects"	
>>
>>#define IMAGEPATHNEEDED   iif(RUNTIME, IMAGE_LOC_RUNTIME, IMAGE_LOC_DEV_EFFECTS)
>>
>>
>>
>>__________________
>>>
>>>#IF VERSION(2) = 2
>>>	#DEFINE IMAGE_LOC_DEV_BASE      ADDBS(SYS(5) + SYS(2003)) + "Media\"
>>>	#DEFINE IMAGE_LOC_DEV_EFFECTS	IMAGE_LOC_BASE + "Effects"	
>>>	#DEFINE IMAGE_LOC_DEV_QA		IMAGE_LOC_BASE + "Toolbars"
>>>#ELSE
>>>	#DEFINE IMAGE_LOC_DEV_BASE      ADDBS(SYS(5) + SYS(2003)) + "Graphics\"
>>>	#DEFINE IMAGE_LOC_DEV_EFFECTS	ADDBS(SYS(5) + SYS(2003)) + "Graphics\"
>>>	#DEFINE IMAGE_LOC_DEV_QA		ADDBS(SYS(5) + SYS(2003)) + "Graphics\"
>>>#ENDIF
>>>
>>>cImagePath = IMAGE_LOC_EFFECTS
>>>
>>>
>>>
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform