home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 22.1 DOSVER()
- Author: Joe Booth
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- //───── NOTE: must compile with the /N option!
-
- #define TEST // remove if you don't need test code
-
- #ifdef TEST // begin stub test program
-
- function test
- if Dosver() < 3.1
- ? "Cannot run networked application on this computer"
- endif
- return nil
-
- #endif // end stub test program
-
- function Dosver()
- LOCAL cDos := os(),x,nVersion:=0.0
- if (x:=at(" ",cDos)) > 0
- nVersion := val(substr(cDos,x+1,99))
- endif
- return nVersion
-
- // end of file CHP2201.PRG
-