<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: %13.7lf format in javascript with post ?</title>
		<atom:link href="http://cycling74.com/forums/topic/%13-7lf-format-in-javascript-with-post/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/%13-7lf-format-in-javascript-with-post/feed</link>
		<description></description>
		<pubDate>Wed, 19 Jun 2013 10:51:49 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/%13-7lf-format-in-javascript-with-post/#post-28347</guid>
					<title><![CDATA[%13.7lf format in javascript with post ?]]></title>
					<link>http://cycling74.com/forums/topic/%13-7lf-format-in-javascript-with-post/#post-28347</link>
					<pubDate>Wed, 25 Oct 2006 10:20:58 +0000</pubDate>
					<dc:creator>jh</dc:creator>

					<description>
						<![CDATA[
						<p>hello,</p>
<p>just new in javascript mailing list and new in javascript language.<br />
how can I post values of variables (or print) in Max window with %ld  <br />
or %13.7lf or %s format ?</p>
<p>and also :<br />
the best books to learn and practice javascript (english or french) ?</p>
<p>thanks .<br />
jh</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/%13-7lf-format-in-javascript-with-post/#post-86907</guid>
					<title><![CDATA[Re: %13.7lf format in javascript with post ?]]></title>
					<link>http://cycling74.com/forums/topic/%13-7lf-format-in-javascript-with-post/#post-86907</link>
					<pubDate>Wed, 25 Oct 2006 12:22:14 +0000</pubDate>
					<dc:creator>radarsat1</dc:creator>

					<description>
						<![CDATA[
						<p>hi,</p>
<p>> how can I post values of variables (or print) in Max window with %ld or<br />
> %13.7lf or %s format ?</p>
<p>unfortunately there&#8217;s no printf-style function in javascript.<br />
look up &#8220;toFixed&#8221;, &#8220;toPrecision&#8221;, and &#8220;toExponential&#8221; on this page.<br />
you have to convert the number to a string using these functions and<br />
then add the resulting strings together with &#8216;+&#8217;.</p>
<p><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Number" rel="nofollow">http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Number</a></p>
<p>if you really want something more like printf, you could try what this guy did:</p>
<p><a href="http://chapnickman.com/2006/02/10/string-formatting-in-javascript/" rel="nofollow">http://chapnickman.com/2006/02/10/string-formatting-in-javascript/</a></p>
<p>note, i haven&#8217;t tested to see if toFixed etc. are working in Max/MSP<br />
but I assume so.</p>
<p>
> the best books to learn and practice javascript (english or french) ?</p>
<p>Don&#8217;t know of any myself, but there is SO much info on the web.<br />
(I rarely use print material these days..)<br />
Just make sure you filter out the web-specific stuff, and find<br />
references for the core language.  Other than that, all you need to<br />
know is in the Javascript for Max/MSP manual.  (You might want to also<br />
read an OpenGL manual if you&#8217;re interested in that.)</p>
<p>In fact that Mozilla page seems like a good starting place, in terms<br />
of references:</p>
<p><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference" rel="nofollow">http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference</a></p>
<p>(Not everything there will be applicable to Max of course..)</p>
<p>Personally I found this little guide quite useful too, though it<br />
assumes a certain amount of knowledge in OO programming:</p>
<p><a href="http://javascript.infogami.com/Javascript_in_Ten_Minutes" rel="nofollow">http://javascript.infogami.com/Javascript_in_Ten_Minutes</a></p>
<p>Hope this helps!<br />
Steve</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/%13-7lf-format-in-javascript-with-post/#post-86908</guid>
					<title><![CDATA[Re: %13.7lf format in javascript with post ?]]></title>
					<link>http://cycling74.com/forums/topic/%13-7lf-format-in-javascript-with-post/#post-86908</link>
					<pubDate>Thu, 26 Oct 2006 11:21:53 +0000</pubDate>
					<dc:creator>jh</dc:creator>

					<description>
						<![CDATA[
						<p></p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

