Discussion:
Using common programs in different versions of VFP
(too old to reply)
Demetrios Panayotakopoulos
2010-05-04 10:31:15 UTC
Permalink
Hi,

Is possible to include in some programs commands that would be ignored
or taken into account based on vfp vesrion during compilation?

For example
MessageBox in VFP takes 3 parameterers and in VFP 9 takes 4 parameters.
If I try to use a common program that calls MessageBox with 4 parameters
and try to compile it with VFP 6 reports an error.

Is it possible to bypass this problem without using different versions
of the program based on VFP version.

Demetrios, Greece
unknown
2010-05-04 13:09:20 UTC
Permalink
Hi Demetrios.

Yes, but you have to use conditional compilation using #IF. For example:

#define clVFP9 version(5) = 900

#if clVFP9
messagebox(parm1, parm2, parm3, parm4)
#else
messagebox(parm1, parm2, parm3)
#endif

Doug



Demetrios Panayotakopoulos wrote:

Using common programs in different versions of VFP
04-May-10

Hi

Is possible to include in some programs commands that would be ignore
or taken into account based on vfp vesrion during compilation

For exampl
MessageBox in VFP takes 3 parameterers and in VFP 9 takes 4 parameters
If I try to use a common program that calls MessageBox with 4 parameter
and try to compile it with VFP 6 reports an error

Is it possible to bypass this problem without using different version
of the program based on VFP version

Demetrios, Greece

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
BOOK REVIEW: Effective C#, Second Edition [Addison Wesley]
http://www.eggheadcafe.com/tutorials/aspnet/b2f8766d-a4c1-4d5a-97af-c38852b3b455/book-review-effective-c.aspx
Demetrios Panayotakopoulos
2010-05-05 03:44:09 UTC
Permalink
Hi Doug,

Thank you so much.

Demetrios, Greece
Post by unknown
Hi Demetrios.
#define clVFP9 version(5) = 900
#if clVFP9
messagebox(parm1, parm2, parm3, parm4)
#else
messagebox(parm1, parm2, parm3)
#endif
Doug
Using common programs in different versions of VFP
04-May-10
Hi,
Is possible to include in some programs commands that would be ignored
or taken into account based on vfp vesrion during compilation?
For example
MessageBox in VFP takes 3 parameterers and in VFP 9 takes 4 parameters.
If I try to use a common program that calls MessageBox with 4 parameters
and try to compile it with VFP 6 reports an error.
Is it possible to bypass this problem without using different versions
of the program based on VFP version.
Demetrios, Greece
Submitted via EggHeadCafe - Software Developer Portal of Choice
BOOK REVIEW: Effective C#, Second Edition [Addison Wesley]
http://www.eggheadcafe.com/tutorials/aspnet/b2f8766d-a4c1-4d5a-97af-c38852b3b455/book-review-effective-c.aspx
Loading...