<?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="sprintf" module="max" category="Messages">
	<digest>
		Format a message of words and numbers
	</digest>
	<description>
		Uses the common C-language &quot;printf&quot; function inside Max. You can combine symbols, organize lists of numbers, or format messages or menu items. For complete documentation, refer to a standard C library reference manual.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Messages
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				First Argument, Causes Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Argument 2 in Format String
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Formatted String as a Message
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="symout" optional="1" type="symbol">
			<digest>
				Optional symout argument
			</digest>
			<description>
				If the first argument is the word <m>symout</m>, the <o>sprintf</o> object outputs the string it generates as a single symbol. Otherwise the output is a list of symbols and/or numbers. The word <m>symout</m> itself is not included in the output of sprintf.
			</description>
		</objarg>
		<objarg name="format" optional="0" type="symbol">
			<digest>
				Output message format
			</digest>
			<description>
				The arguments form a message to be sent out, in a format resembling the C programming language. The arguments may be words, numbers, or changeable arguments for incoming symbols (<m>%s), ints</m> ( <m>%ld</m>), floats (<m>%f</m>), and ints that are to be formatted as ASCII characters (<m>%c</m>). The number of inlets is determined by the number of changeable arguments, with each inlet corresponding to a changeable argument, in order.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output using the most recent values
			</digest>
			<description>
				In left inlet: Formats the message using the values currently stored.
				<br />
				<br />
				Any of the above messages in the left inlet will format the message and send it out. If no value has been received for a changeable number argument (<m>%ld</m> or <m>%f</m>), 0 will be substituted for that argument. If no value has been received for a <m>%s</m> or <m>%c</m> argument, that argument will be left blank.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Replace expression value
			</digest>
			<description>
				May be received in any inlet that corresponds to a <m>%ld</m> or <m>%c</m> argument. The number will be stored in place of that argument. A <m>%c</m> argument will convert the int to its ASCII character equivalent.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Replace expression value
			</digest>
			<description>
				May be received in any inlet that corresponds to a <m>%f</m> argument. The number will be stored in place of that argument.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Replace expression values
			</digest>
			<description>
				In left inlet: Each item in the list is treated as if it had been received in a separate inlet, up to the number of inlets.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Replace expression value
			</digest>
			<description>
				Performs the same function as a <m>list</m>.
			</description>
		</method>
		<method name="symbol">
			<arglist>
				<arg name="input" optional="0" type="symbol" />
			</arglist>
			<digest>
				Replace expression value
			</digest>
			<description>
				May be received in any inlet that corresponds to a <m>%s</m> argument. The symbol will be stored in place of that argument.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="sprintf.png" caption="Changeable arguments are replaced by values received in the inlets" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="atoi" />
		<seealso name="combine" />
		<seealso name="fromsymbol" />
		<seealso name="itoa" />
		<seealso name="key" />
		<seealso name="keyup" />
		<seealso name="message" />
		<seealso name="regexp" />
		<seealso name="spell" />
		<seealso name="tosymbol" />
	</seealsolist>
	<misc name="Output">
		<entry name="anything">
			<description>
				The message specified by the typed-in argument(s) is formatted and sent out with substitutions made for the changeable arguments.
			</description>
		</entry>
	</misc>
</c74object>
