Tcl is designed so that you can write scripts that run unchanged on UNIX, Macintosh, and Windows platforms. In practice, you may need a small amount of code that is specific to a particular platform. You can find out information about the platform via the tcl_platform variable. This is an array with these elements defined:
tcl_platform(platform) is one of unix, macintosh, or windows.
tcl_platform(os) identifies the operating system. Examples include MacOS, Solaris, Linux, Win32s (Windows 3.1 with the Win32 subsystem), Windows 95, Windows NT, and SunOS.
tcl_platform(osVersion) gives the version number of the operating system.
tcl_platform(machine) identifies the hardware. Examples include ppc (Power PC), 68k (68000 family), ...