docs.intersystems.com
Home / ObjectScript Reference / ObjectScript Functions / $ZVERSION(1)

ObjectScript Reference
$ZVERSION(1)
Previous section           Next section
InterSystems: The power behind what matters   
Search:  


Returns the operating system type.
Synopsis
$ZVERSION(1)
Parameter
The only supported parameter value is the number 1.
Description
$ZVERSION(1) returns the current operating system type as an integer code. It returns the following values: 2 for Windows, 3 for UNIX®, and 0 if not known.
You can use the isWINDOWS and isUNIX system-supplied macros to return the same information as a boolean value.
You can use the %SYSTEM.Version.GetOS() to return the same information as a string.
You can use the $ZVERSION special variable to return complete InterSystems IRIS version information, including the current operating system type.
Example
The following example returns the current operating system type:
#Include %occInclude
  WRITE "OS type as code: ",$ZVERSION(1),!
  WRITE "OS type as Boolean: ",!
  WRITE "Windows? ",$$$isWINDOWS,"  UNIX? ",$$$isUNIX,!
  WRITE "OS type as string: ",$SYSTEM.Version.GetOS(),!
  WRITE "InterSystems IRIS Version: ",$ZVERSION
See Also


Previous section           Next section
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-04-10 14:45:57