<doc>
	<legacy_id>2030</legacy_id>
	<name>platform</name>
	<type>function</type>

	<syntax>
		<example>the platform</example>
		<example>platform()</example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary><glossary tag="return">Returns</glossary> the name of the operating system LiveCode is running on.</summary>

	<examples>
<example>the platform</example>
<example>if the platform is &quot;MacOS&quot; then set the activatePalettes to true</example>
	</examples>

	<history>
		<introduced version="1.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version="1.1">1.1</changed>
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
		<ios/>
		<android/>
	</platforms>

	<classes>
		<desktop/>
		<server/>
		<web/>
		<mobile/>
	</classes>

	<security>
	</security>


	<classification>
		<category>The System Environment</category>
		<category>Standalone Applications</category>
	</classification>

	<references>
		<function tag="deleteRegistry">deleteRegistry Function</function>
		<function tag="processor">processor Function</function>
		<function tag="MCISendString">MCISendString Function</function>
		<function tag="buildNumber">buildNumber Function</function>
	</references>

	<description>
	<overview>Use the <b>platform</b> <control_st tag="function">function</control_st> to change a <glossary tag="stack">stack's</glossary> <glossary tag="behavior">behavior</glossary> or <glossary tag="appearance">appearance</glossary> depending on the operating system.</overview>

		<parameters>
		</parameters>

	<value>The platform function returns one of the following strings:<p></p><p>MacOS             any Mac OS, OS X, or Darwin system</p><p>Linux             Linux for Intel or PowerPC architecture</p><p>BSD          BSD UNIX (BSDI, FreeBSD)</p><p>HP-9000/700 HP-UX</p><p>SGI IRIS               Silicon Graphics IRIX</p><p>IBM RS/6000    AIX</p><p>Intel SCO        SCO Open DeskTop</p><p>Intel SVR4  Solaris for x86 architecture</p><p>SPARC           SPARC SunOS</p><p>SPARC Solaris    SPARC Solaris</p><p>Win32   Windows (any version post-3.1)</p><p>iphone&#9;iOS devices</p><p>android&#9;Android devices</p></value>
	<comments>The <b>platform</b> <control_st tag="function">function</control_st> is compiled into each version of the LiveCode <glossary tag="engine">engine</glossary>. This means that, for example, if you're developing on a <glossary tag="Mac OS">Mac OS system</glossary> and you build a <glossary tag="standalone application">standalone application</glossary> for <glossary tag="Unix">Linux</glossary>, when you run the <glossary tag="standalone application">standalone application</glossary> on a <glossary tag="Unix">Linux</glossary> system, the <b>platform</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> &quot;Linux&quot;.<p></p><p><code tag=""><tip></code><code tag=""> To determine whether a Mac system is running </code><glossary tag="Mac OS">Mac OS</glossary> or <glossary tag="OS X">OS X</glossary>, use the <function tag="systemVersion">systemVersion</function><control_st tag="function">function</control_st> along with the <b>platform </b><control_st tag="function">function</control_st>, as in the following example:</tip><p></p><p><code tag="">  set the itemDelimiter to &quot;.&quot; </code><code tag="">-- versions are of the form &quot;x.y.z&quot;</code></p><p><code tag="">  if the platform is &quot;MacOS&quot; and item 1 of the systemVersion &gt;= 10 then</code></p><p><code tag="">    answer &quot;This is an OS X system.&quot;</code></p><p><code tag="">  end if</code></p><p></p><p></p><change><p>Support for Alpha Digital UNIX was removed and support for OS X was added in version 1.1.</change></comments>
	</description>
</doc>