<doc>
	<legacy_id>1268</legacy_id>
	<name>write to driver</name>
	<type>command</type>

	<syntax>
		<example>write <i>value</i> to driver <i>deviceName</i></example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Sends data to a <glossary tag="peripheral device">device</glossary> that has been opened with the <command tag="open driver">open driver</command> <glossary tag="command">command</glossary>.</summary>

	<examples>
<example>write "test" &amp; return to driver "/dev/cu.modem"</example>
	</examples>

	<history>
		<introduced version="1.1.1">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version="2.0">2.0</changed>
		<experimental version=""></experimental>
		<nonexperimental version=""></nonexperimental>
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
	</platforms>

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

	<security>
		<disk/>
		<process/>
	</security>


	<classification>
		<category>Networks &amp; Communication</category>
	</classification>

	<references>
		<function tag="driverNames">driverNames Function</function>
		<command tag="close driver">close driver Command</command>
		<command tag="open driver">open driver Command</command>
		<command tag="read from driver">read from driver Command</command>
		<command tag="write to file">write to file Command</command>
		<command tag="write to process">write to process Command</command>
		<command tag="write to socket">write to socket Command</command>
		<keyword tag="COMn:">COMn: Keyword</keyword>
		<keyword tag="int1">int1 Keyword</keyword>
		<keyword tag="int2">int2 Keyword</keyword>
		<keyword tag="int4">int4 Keyword</keyword>
		<keyword tag="LPT1:">LPT1: Keyword</keyword>
		<keyword tag="modem:">modem: Keyword</keyword>
		<keyword tag="printer:">printer: Keyword</keyword>
		<keyword tag="real4">real4 Keyword</keyword>
		<keyword tag="real8">real8 Keyword</keyword>
	</references>

	<description>Use the <b>write to driver</b> <glossary tag="command">command</glossary> to control a <glossary tag="peripheral device">peripheral device</glossary> or send data through it.<p></p><p><b>Parameters:</b></p><p>The <i>value</i> is any <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to a <keyword tag="string">string</keyword>.</p><p></p><p>The <i>deviceName</i> is the name of a <glossary tag="device driver">device driver</glossary> that's installed on the system and that you have previously opened with the <command tag="open driver">open driver</command> <glossary tag="command">command</glossary>.</p><p></p><p><b>Comments:</b></p><p>The device to write to must be opened first with the <command tag="open driver">open driver</command> <glossary tag="command">command</glossary>, and the mode the device was opened in must be either write or update. If the device is not open or is open read-only, the <function tag="result">result</function> <control_st tag="function">function</control_st> is set to "File is not open for write.".</p><p></p><p></p><change><p>Support for using serial drivers with OS X systems was added in version 2.0.</change></description>
</doc>