<doc>
	<legacy_id>1658</legacy_id>
	<name>$</name>
	<type>keyword</type>

	<syntax>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>The character <b>$</b> (dollar sign) is used to indicate an <glossary tag="environment variable">environment variable</glossary> on <glossary tag="Unix">Unix systems</glossary> and a command-line parameter on <glossary tag="Unix">Unix</glossary> or <glossary tag="Windows">Windows systems</glossary>.</summary>

	<examples>
<example>put $LOGNAME into field &quot;Login Name&quot;</example>
<example>if $0 is not myAppName then answer &quot;Problem initializing!&quot;</example>
	</examples>

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

	<objects>
	</objects>

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

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

	<security>
	</security>


	<classification>
		<category>Values &amp; Properties</category>
		<category>The System Environment</category>
	</classification>

	<references>
		<function tag="paramCount">paramCount Function</function>
		<keyword tag="@">@ Keyword</keyword>
		<message tag="relaunch">relaunch Message</message>
		<control_st tag="function">function Control Structure</control_st>
		<control_st tag="setProp">setProp Control Structure</control_st>
	</references>

	<description>
	<overview>Use the <b>$</b> <glossary tag="keyword">keyword</glossary> to interact with the system environment and to find out what <glossary tag="argument">arguments</glossary> were used if the application was started up from the command line.</overview>

		<parameters>
		</parameters>

	<value></value>
	<comments>The <b>$</b> character marks two kinds of special <glossary tag="variable">variables</glossary>: <glossary tag="command line">command-line</glossary> <glossary tag="argument">arguments</glossary> (on <glossary tag="OS X">OS X</glossary>, <glossary tag="Unix">Unix</glossary>, and <glossary tag="Windows">Windows systems</glossary>) and <glossary tag="environment variable">environment variables</glossary> (on <glossary tag="OS X">OS X</glossary> and <glossary tag="Unix">Unix systems</glossary>).<p></p><p>If you start up the application from the command line (on OS X, Unix or Windows systems), the command name is stored in the global variable $0 and any arguments passed on the command line are stored in numbered variables starting with the <b>$</b> character. For example, if you start the application by typing the following <function tag="shell">shell</function> command:</p><p></p><p>  myrevapp -h name</p><p></p><p>then the global variable $0 contains &quot;myrevapp&quot; (the name of the application), $1 contains &quot;-h&quot;, and $2 contains &quot;name&quot;.</p><p></p><p>If an argument includes spaces, it must be enclosed in quotes on the command line:</p><p></p><p>  myrevapp -in &quot;new info.txt&quot;  -out &quot;new info.xml&quot;</p><p></p><p>On Unix and OS X systems, a variable whose name begins with the <b>$</b> character is exported to the <glossary tag="application">application's</glossary> environment, and is inherited by <glossary tag="process">processes</glossary> started up by the <function tag="shell">shell</function> <control_st tag="function">function</control_st> or the <command tag="open process">open process</command> <glossary tag="command">command</glossary>. Use this technique to create your own <glossary tag="environment variable">environment variables</glossary>.</p><p></p><p>You can access existing environment variables by prepending the <b>$</b> character to the <glossary tag="environment variable">environment variable's</glossary> name. For example, the following <glossary tag="statement">statement</glossary> gets the contents of the LOGNAME <glossary tag="environment variable">environment variable</glossary>:</p><p></p><p>  get $LOGNAME</p></comments>
	</description>
</doc>