OS(), Sys(9), Version(), Version
These three functions and one property give you information about your software setup. OS() provides DOS and Windows version information, while SYS(9), VERSION() and the application object's Version property provide FoxPro version information.
Usage |
cOpSys = OS( [ 1 | 2 ] ) |
Example |
? OS() && Returns Windows 5.00 on Della's Win2K system ? OS(1) && Also returns Windows 5.00 on Della's system ? OS() && Returns Windows 4.00 on Ted's old Win95 system ? OS(2) && Returns "" on Della's system |
Usage |
cSerialNumber = SYS(9) |
Usage |
uVersionInfo = VERSION( nExpression ) cVersionNumber = appApplication.Version |
Parameter |
Value |
Meaning |
nExpression |
Omitted |
Return product name and version. |
1 |
Return product name, version, date and serial number. |
|
2 |
Return edition information: |
|
0 – Runtime |
||
1 – Standard |
||
2 – Professional |
||
3 |
Return localization information. See Help for the list of languages. |
|
4 |
Return the version number portion only, but complete with all the major and minor and build number info. In VFP 7, the build number is in the fourth position, and in VFP 6, the build number is in the third position. Previous versions don't supply a build number. |
|
5 |
Return just the version number, as a number, not a string. The first digit is the major version number, and the other two are the minor revision number. |
Example |
* At the end of an app, if we're in interactive VFP, * we need to put some things back the way we found them. IF VERSION(2)<>0 SET HELP TO cOldHelp SET RESOURCE TO cOldResource MODIFY WINDOW SCREEN ENDIF |
See Also |