VERSION( ) Function

Example   See Also

Returns information about the Visual FoxPro version you are using.

Syntax

VERSION(nExpression)

Returns

Character, Numeric

Arguments

nExpression

Specifies that VERSION( ) returns additional information about Visual FoxPro. If you omit nExpression, VERSION( ) returns the Visual FoxPro version number.

The following table lists values for nExpression and the additional Visual FoxPro information returned.

nExpression Additional Visual FoxPro information returned
1 Visual FoxPro date and serial number.
2 Visual FoxPro version type:
0 - Run time version
1 - Standard Edition (earlier versions)
2 - Professional Edition (earlier versions)
3 Localized Visual FoxPro language. The following two character values indicate the language for which Visual FoxPro is localized:
00 - English
33 - French
34 - Spanish
39 - Italian
42 - Czech
48 - Polish
49 - German
55 - Portuguese
82 - Korean
86 - Simplified Chinese
88 - Traditional Chinese
4 The Visual FoxPro version number in a standard, easily parsed format. The standard format is "MM.00.YDDD.mm" where MM is the major release number, 00 is a fixed placeholder, YDDD is the four digit product date for the day the version was created, and mm is the incremental minor revision number.

For the product date YDDD, Y is the year number in the 1990 decade, and DDD is the day number for that year. For example, 8001 corresponds to January 1, 1998.

5 The Visual FoxPro release version in the format "Mmm" where M is the major release number and mm is the incremental minor revision number. For example, VERSION(5) returns "600” in Visual FoxPro 6.0.

Remarks

Use VERSION( ) to conditionally execute version-specific portions of code.

VERSION( ), VERSION(1), VERSION(3), and VERSION(4) return character strings; VERSION(2) returns a numeric value.