VERSION( ) Function
Returns information about the Visual FoxPro version you are using.
VERSION(nExpression)
Return Values
Character, Numeric
Parameters
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 version1 - 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
07 - Russian
33 - French
34 - Spanish
39 - Italian
42 - Czech
48 - Polish
49 - German
55 - Portuguese
82 - Korean
86 - Simplified Chinese
88 - Traditional Chinese4 The Visual FoxPro version number in a standard, easily parsed format. For versions prior to Visual FoxPro 8 the standard format is "MM.mm.0000.DDDD" where MM is the major release number, mm is the incremental minor revision number, 0000 is a fixed placeholder, and DDDD is the four digit product date for the day the version was created.
The product date, DDDD, is calculated in the following formula: 8000 + number of days since the beginning of 1998. For example, 8397 corresponds to February 1, 1999.
However, the format for Visual FoxPro 8 is "MM.mm.0000.NNDD" where MM is the major release number, mm is the incremental minor revision number, 0000 is a fixed placeholder, NN is the number of months after December 2000, and DD is the day number of the date the version was created.
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 700 in Visual FoxPro 7.
Remarks
Use VERSION( ) to conditionally execute version-specific portions of code.
VERSION( ), VERSION(1), VERSION(3), and VERSION(4) return character strings; VERSION(2) and VERSION(5) return numeric values.
Example
CLEAR
? VERSION( )
? VERSION(1)
? VERSION(2)
? VERSION(3)
? VERSION(4)
? VERSION(5)