<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="swap" module="max" category="Right-to-Left">
	<digest>
		Swap position of two numbers
	</digest>
	<description>
		Swaps the values of its inlets, preserving right-to-left ordering. The first outlet type is determined by its argument. The second outlet's type is always an int.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Right-to-Left
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Sets Value for Right Outlet, Causes Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Sets Value for Left Outlet
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Value From Right Inlet
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Value From Left Inlet
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="initial" optional="1" type="number">
			<digest>
				Initial value and type
			</digest>
			<description>
				Sets an initial value for the number which is to be sent out the left outlet. If there is no argument, the initial value is 0. If there is an int argument or no argument, an int is sent out the left outlet. (The number sent out the right outlet is always a int.)
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Send out current values
			</digest>
			<description>
				In left inlet: Swaps and sends out the numbers currently stored in <o>swap</o>.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Store and swap data
			</digest>
			<description>
				The number is sent out the right outlet, then the number in the right inlet is sent out the left outlet.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Store and swap data
			</digest>
			<description>
				The numbers are converted to int, unless there is a float argument, in which case the number received in the right inlet is stored as a float.
			</description>
		</method>
		<method name="ft1">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Store data to swap
			</digest>
			<description>
				The number is stored to be sent out the left outlet when a number is received in the left inlet.
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Store data to swap
			</digest>
			<description>
				The number is stored to be sent out the left outlet when a number is received in the left inlet.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="left" optional="0" type="number" />
				<arg name="right" optional="0" type="number" />
			</arglist>
			<digest>
				Store and swap data
			</digest>
			<description>
				In left inlet: The numbers are stored in <o>swap</o>. The first number is sent out the right outlet, then the second number is sent out the left outlet.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="swap.png" caption="Numbers are sent out in reverse order from that in which they were received" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="buddy" />
		<seealso name="fswap" />
		<seealso name="join" />
		<seealso name="pack" />
		<seealso name="unjoin" />
		<seealso name="unpack" />
		<seealso name="basicchapter17" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				When a number is received in the left inlet, the number in each inlet is sent out the opposite outlet.
			</description>
		</entry>
		<entry name="float">
			<description>
				If there is a float argument, the number sent out the left outlet is a float.
			</description>
		</entry>
	</misc>
</c74object>
