<?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 a float.
	</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="int or float">
			<digest>
				Set 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 float.)
			</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>fswap</o>.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Store and swap data
			</digest>
			<description>
				If there is a float argument, the numbers are converted to float. If there is an int argument or no argument, the number received in the right inlet is stored as an int. See the <m>float</m> entry for more details.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Store and swap data
			</digest>
			<description>
				In left inlet: 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="ft1">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Store data to swap
			</digest>
			<description>
				In right inlet: 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>
				In right inlet: The number is stored to be sent out the left outlet when a number is received in the left inlet.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="fswap.png" caption="Numbers are sent out in reverse order from the order in which they were received" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="join" />
		<seealso name="pack" />
		<seealso name="swap" />
		<seealso name="unjoin" />
		<seealso name="unpack" />
	</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. If there is an int argument or no argument, an int is sent out the left outlet.
			</description>
		</entry>
		<entry name="float">
			<description>
				The number sent out the right outlet is always a float. The number sent out the left outlet is a float only if there is a float argument.
			</description>
		</entry>
	</misc>
</c74object>
