View source code
Display the source code in std/system.d from which this page was generated on
github.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Page wiki
View or edit the community-maintained wiki page associated with this page.
std.system.os - multiple declarations
- Variable os
- Enum OS
Variable os
The OS that the program was compiled for.
Declaration
immutable(OS) os = cast(OS)3;
Enum OS
Operating system.
The enum base type is
.
int
Enum members
| Name | Description |
|---|---|
android
|
Android |
freeBSD
|
FreeBSD |
linux
|
All Linux Systems |
osx
|
Mac OS X
|
otherPosix
|
Other Posix Systems |
solaris
|
Solaris |
win32
|
Microsoft 32 bit Windows systems |
win64
|
Microsoft 64 bit Windows systems |
Note
This is for cases where you need a value representing the OS at
runtime. If you're doing something which should compile differently
on different OSes, then please use version(Windows),
version(, etc.
linux)
See Also
Authors
Walter Bright and Jonathan M Davis