Aracılığıyla paylaş


VERSION( ) Function

Returns information about the Visual FoxPro version you are using.

VERSION(nExpression)

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 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

    07 - Russian

    33 - French

    34 - Spanish

    39 - Czech

    48 - German

    55 - Korean

    86 - Simplified Chinese

    88 - Traditional Chinese

    4

    The Visual FoxPro version number in a standard, easily parsed format.

    For versions prior to Visual FoxPro 8.0, 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.

    For Visual FoxPro 8.0, the formula for calculating the product date, DDDD, is 8000 + number of days since the beginning of 1998. For example, 8397 corresponds to February 1, 1999.

    For Visual FoxPro 9.0, the formula for calculating the product date, DDDD, is number of months since January 1, 2003 concatenated with the day of the current month. For example, 2215 corresponds to October 15, 2004.

    The format for Visual FoxPro 8.0 and 9.0 is "MM.mm.0000.NNNN" where MM is the major release number, mm is the incremental minor revision number, 0000 is a fixed placeholder, and NNNN is the build number.

    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.0.

Return Value

Character, Numeric

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)

See Also

Reference

GETCP( ) Function

GETENV( ) Function

OS( ) Function

AGETFILEVERSION( ) Function

Other Resources

Functions

Language Reference (Visual FoxPro)