Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question on EXTERNAL command
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00814214
Message ID:
00814297
Views:
9
I know, I know :o) In the past ( I should say REALLY in the past) when I used to develop in FPD26 on a pc but compile it under DOS or Unix depending on what OS it ran on (we used to have 17 SCO systems), I used _DOS and _UNIX to determine which OS or version I was compiling under throughout my app. However, this app was already in place when I joined the team and it was determined by others to use the longer #IF VISUAL $ (VERSION()) check and for consistency, it continues...I'm just a single pea in pea soup here...


>>Below is code in a VFP app that also runs in FPD26. The FPD26 version runs a screen and the VFP version runs a form:
>>
>>
>>#IF !'VISUAL' $ UPPER(VERSION())
>>	DO co_prnt.spr
>>#ELSE
>>	DO FORM co_prnt.scx NAME oco_prnt LINKED
>>#ENDIF		
>>
>>
>>One of my coworkers modified it to now be the below code:
>>
>>
>>#IF !'VISUAL' $ UPPER(VERSION())
>>	DO co_prnt.spr
>>#ELSE
>>	EXTERNAL PROC co_prnt.scx
>>	SET KEYCOMP TO DOS
>>	DO FORM co_prnt.scx NAME oco_prnt LINKED
>>	SET KEYCOMP TO WINDOWS
>>#ENDIF		
>>
>>
>>My question is why add the EXTERNAL PROC line? Isn't that NOT necessary in VFP? All functions running in the vfp8 form are contained in the form itself as properties of the form. I could understand a EXTERNAL FORM command if I was using macro substitution, but I'm not.
>>
>>TIA,
>
>Tracy,
>
>I know you have the answer already, but you could make the code shorter by using
#IF _DOS
>  * DOS Code here
>#ELSE
>  * VFP Stuff here
>#ENDIF
Of course, if this also has to be done for FPW then it doesn't work.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform