View source code
Display the source code in std/system.d from which this
page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a
Bugzilla issue.
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.
std.system.OS/os
- multiple declarations
Variable os
The OS that the program was compiled for.
Enum OS
Operating system.
enum OS
: int { ... }
Enum members
Name | Description |
---|---|
android
|
Android |
dragonFlyBSD
|
DragonFlyBSD |
freeBSD
|
FreeBSD |
linux
|
All Linux Systems, except for Android |
netBSD
|
NetBSD |
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 (linux)
, etc.
See Also
Authors
License
Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.