<?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="pack" module="max" category="Lists">
	<digest>
		Create a list
	</digest>
	<description>
		Combine items into an output list. The arguments determine the list format and types of the list elements. The number of inlets is based on the number of arguments.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Lists
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				value for the first list element, causes output
			</digest>
			<description>
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				value for the second list element
			</digest>
			<description>
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Output list
			</digest>
			<description>
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="list-elements" optional="1" type="any">
			<digest>
				List elements
			</digest>
			<description>
				The number of inlets is determined by the number of arguments. Each argument sets an initial type and value for an item in the list produced by <o>pack</o>. If there are no arguments, the object will be created with two inlets, and the two list elements will be set to (int) 0 initially.
			</description>
			<discussion>
				Note: Typing a list into an object box automatically identifies it as a pack object. Therefore, you may omit the word pack from the object box provided that you type in a list of arguments that has at least two items and begins with a number.
			</discussion>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output currently stored list
			</digest>
			<description>
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Store an int list element
			</digest>
			<description>
				The number is stored as an item in a list, with its position in the list corresponding to the inlet in which it was received. A number in the left inlet also causes the list to be output. If the inlet has been initialized with a float or symbol argument, the incoming number will be converted to a float or a blank symbol.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Store a float list element
			</digest>
			<description>
				The number is stored as an item in a list, with its position in the list corresponding to the inlet in which it was received. A number in the left inlet also causes the entire list to be the output. If the inlet has been initialized with an int or symbol argument, the incoming number will be converted to an int or a (blank) symbol.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Set multiple list elements
			</digest>
			<description>
				Any multi-item message is treated as a list. The first item in the incoming list is stored in in the location that corresponds to the inlet in which it was received. Each subsequent item is stored as if it had arrived in subsequent inlets (limited to the number of inlets available). A list received in the left inlet causes the entire stored list to be sent out the outlet.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Store values in the list
			</digest>
			<description>
				Performs the same function as <m>list</m>.
			</description>
		</method>
		<method name="nth">
			<arglist>
				<arg name="index" optional="0" type="int" />
			</arglist>
			<digest>
				Return one list element
			</digest>
			<description>
				The <m>nth</m> message will output the stored list element at the index. Output is sent from the first outlet.
			</description>
		</method>
		<method name="send">
			<arglist>
				<arg name="receive-name" optional="0" type="list" />
			</arglist>
			<digest>
				Send the list to receive objects
			</digest>
			<description>
				Sends the stored list to all <o>receive</o> objects with a matching name.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Set data without output
			</digest>
			<description>
				Sets the values without causing list output. Although the <m>set</m> message works with any inlet, it is only meaningful in the left inlet, which is the only inlet that will trigger output.
			</description>
		</method>
		<method name="symbol">
			<arglist>
				<arg name="input" optional="0" type="symbol" />
			</arglist>
			<digest>
				Store a symbol list element
			</digest>
			<description>
				Stores the symbol in the list at the position corresponding to the inlet it was received. If the list element was initialized as a number, the symbol is converted to 0 before being stored. A symbol in the left inlet triggers output of the list.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="pack.png" caption="Numbers and symbols may be mixed as needed in pack" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="bondo" />
		<seealso name="buddy" />
		<seealso name="join" />
		<seealso name="match" />
		<seealso name="pak" />
		<seealso name="swap" />
		<seealso name="thresh" />
		<seealso name="unjoin" />
		<seealso name="unpack" />
		<seealso name="zl" />
		<seealso name="basicchapter09" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="list">
			<description>
				The length of the list is determined by the number of arguments. When input is received in the left inlet, the stored list is sent out the outlet.
			</description>
		</entry>
		<entry name="any">
			<description>
				When the <m>nth</m> message is received, the value of the specified item is sent out.
			</description>
		</entry>
	</misc>
</c74object>
