{"id":199,"date":"2024-09-30T11:03:56","date_gmt":"2024-09-30T10:03:56","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=199"},"modified":"2024-09-30T11:03:56","modified_gmt":"2024-09-30T10:03:56","slug":"mwnci-float-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-float-function\/","title":{"rendered":"Mwnci float() Function"},"content":{"rendered":"<h2><span id=\"Syntax\" class=\"mw-headline\">Syntax<\/span><\/h2>\n<p>float(<i><b>argument<\/b><\/i>)<\/p>\n<h2><span id=\"Description\" class=\"mw-headline\">Description<\/span><\/h2>\n<p>The <i>float()<\/i> function returns the floating point number converted from a <i>string<\/i>, and <i>integer<\/i>. A boolean will always return as <i>1.00&#8242;<\/i>, and the orginal number is returned if it&#8217;s already floating point. All other data types will error.<\/p>\n<h2><span id=\"Example\" class=\"mw-headline\">Example<\/span><\/h2>\n<pre>a=1\r\nb=float(a)\r\nprintf(\"b=%f\\n\", b)\r\n\r\n\r\nb=1.000000\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax float(argument) Description The float() function returns the floating point number converted from a string, and integer. A boolean will always return as 1.00&#8242;, and the orginal number is returned if it&#8217;s already floating point. All other data types will error. Example a=1 b=float(a) printf(&#8220;b=%f\\n&#8221;, b) b=1.000000<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-199","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=199"}],"version-history":[{"count":2,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/199\/revisions"}],"predecessor-version":[{"id":201,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/199\/revisions\/201"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}