{"id":2354,"date":"2025-04-15T11:35:16","date_gmt":"2025-04-15T11:35:16","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=2354"},"modified":"2025-06-10T08:16:12","modified_gmt":"2025-06-10T08:16:12","slug":"acomrx_fgetnum-ppfw-d29","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/acomrx_fgetnum-ppfw-d29\/","title":{"rendered":"aComRx_fGetNum pp,fw [D>=29]"},"content":{"rendered":"\n<p>Return a decimal number from the head of the Rx buffer for the serial port at address&nbsp;<code>pp<\/code>. Skip any leading spaces. Process leading + or &#8211;&nbsp;sign if present. Terminate on anything thereafter that&#8217;s not a decimal digit or decimal point, or after processing&nbsp;<code>fw<\/code>&nbsp;characters in total (including spaces, sign and decimal point). Consume the characters used but not the terminating character. Result in W, NaN if nothing there. R register signals outcome. 0 = OK, 1 = no valid decimal number present.<\/p>\n\n\n\n<p>Notes:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>This differs from the same instruction without the leading &#8216;a&#8217; in that it explicitly nominates a serial port address (pp) rather than the default serial port.<\/li>\n\n\n\n<li>This instruction will only process characters that have already been received. You should therefore ensure that either a known terminating character, or the required number of characters, have been received before attempting to execute this instruction.<\/li>\n\n\n\n<li>The character count&nbsp;<code>fw<\/code>&nbsp;includes leading spaces, signs and decimal point.<\/li>\n\n\n\n<li>The only characters removed from the buffer are leading spaces plus the characters that form the number. Hence, if a terminating character is encountered before&nbsp;<code>fw<\/code>&nbsp;characters are used, less than&nbsp;<code>fw<\/code>&nbsp;characters will be removed from the buffer.<\/li>\n\n\n\n<li>Conversion will end on the first unexpected character, including a trailing space, a second sign character or a second decimal point. This overrides the field width.<\/li>\n\n\n\n<li>The valid range for&nbsp;<code>fw<\/code>&nbsp;is 1 to 255.&nbsp;<code>fw<\/code>&nbsp;= 255 disables character counting.<\/li>\n\n\n\n<li>Anything more than 7 digits of input is meaningless, as the floating point number representation is only accurate to 6 or 7 decimal places. Excess digits will be nevertheless be consumed, up to the limits of&nbsp;<code>fw<\/code>.<\/li>\n<\/ol>\n\n\n\n<p>Can only exist on boards that have an uncommitted serial port other than the programming port.<\/p>\n\n\n\n<p>See also<code> <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/memory-instructions\/comrx_gethex-d23\/\">COMRx_GetHex<\/a>, <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/default-serial-port\/comrx_buflen-d23\/\">COMRx_BufLen<\/a>, <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/default-serial-port\/comrx_findxinbuf-x-d23\/\">COMRx_FindXInBuf<\/a><\/code><\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Examples<\/h6>\n\n\n\n<p>The following shows the result of the instruction&nbsp;<code>ComRx_fGetNum 8<\/code>&nbsp;for various receive buffer contents.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Receive buffer contents before (Shown as ASCII (printable) characters.<\/td><td>Result returned in W<\/td><td>Receive buffer contents after conversion<\/td><td>Comment<\/td><\/tr><tr><td><code>123.456xxxxxxxx<\/code><\/td><td>23.456<\/td><td><code>xxxxxxxx<\/code><\/td><td>&nbsp;<\/td><\/tr><tr><td><code>123.456xxxx<\/code><\/td><td>123<\/td><td><code>456xxxx<\/code><\/td><td>Leading spaces are counted in the field width. The decimal point &#8220;makes it&#8221;,<\/td><\/tr><tr><td><code>-123.456xxxxxxx<\/code><\/td><td>-123.456<\/td><td><code>xxxxxxx<\/code><\/td><td>All good, got it all<\/td><\/tr><tr><td><code>-123.456xxxxxx<\/code><\/td><td>-123.45<\/td><td>&nbsp;<\/td><td>The last digit is excluded, because the field width of 8 terminates conversion. Furthermore, a subsequent conversion (with&nbsp;<code>I<\/code>&nbsp;as-is) would return 6.<\/td><\/tr><tr><td><code>-12.3.456xxxxx<\/code><\/td><td>-12.3<\/td><td><code>.456xxxxx<\/code><\/td><td>The second decimal point terminates conversion. If the same instruction were executed again (with&nbsp;<code>I<\/code>&nbsp;as-is), it would return 0.456<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Dialect exclusions: Not available in dialects before 29<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Return a decimal number from the head of the Rx buffer for the serial port at address&nbsp;pp. Skip any leading spaces. Process leading + or&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2353,"menu_order":0,"template":"","class_list":["post-2354","spl_knowledgebase","type-spl_knowledgebase","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>aComRx_fGetNum pp,fw [D&gt;=29] - SPLat Controls<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"aComRx_fGetNum pp,fw [D&gt;=29] - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"Return a decimal number from the head of the Rx buffer for the serial port at address&nbsp;pp. Skip any leading spaces. Process leading + or...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/acomrx_fgetnum-ppfw-d29\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-10T08:16:12+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/acomrx_fgetnum-ppfw-d29\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/acomrx_fgetnum-ppfw-d29\/\",\"name\":\"aComRx_fGetNum pp,fw [D>=29] - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-15T11:35:16+00:00\",\"dateModified\":\"2025-06-10T08:16:12+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/acomrx_fgetnum-ppfw-d29\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/acomrx_fgetnum-ppfw-d29\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/acomrx_fgetnum-ppfw-d29\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Programming reference\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Instructions arranged by function\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Floating point instructions\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"aComRx_fGetNum pp,fw [D>=29]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\",\"name\":\"SPLat Controls\",\"description\":\"OEM Embedded Machine Controllers\",\"publisher\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization\",\"name\":\"SPLat Controls\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg\",\"contentUrl\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg\",\"caption\":\"SPLat Controls\"},\"image\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"aComRx_fGetNum pp,fw [D>=29] - SPLat Controls","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"aComRx_fGetNum pp,fw [D>=29] - SPLat Controls","og_description":"Return a decimal number from the head of the Rx buffer for the serial port at address&nbsp;pp. Skip any leading spaces. Process leading + or...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/acomrx_fgetnum-ppfw-d29\/","og_site_name":"SPLat Controls","article_modified_time":"2025-06-10T08:16:12+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/acomrx_fgetnum-ppfw-d29\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/acomrx_fgetnum-ppfw-d29\/","name":"aComRx_fGetNum pp,fw [D>=29] - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-15T11:35:16+00:00","dateModified":"2025-06-10T08:16:12+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/acomrx_fgetnum-ppfw-d29\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/acomrx_fgetnum-ppfw-d29\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/acomrx_fgetnum-ppfw-d29\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/"},{"@type":"ListItem","position":2,"name":"Programming reference","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/"},{"@type":"ListItem","position":3,"name":"Instructions arranged by function","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/"},{"@type":"ListItem","position":4,"name":"Floating point instructions","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/"},{"@type":"ListItem","position":5,"name":"aComRx_fGetNum pp,fw [D>=29]"}]},{"@type":"WebSite","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/","name":"SPLat Controls","description":"OEM Embedded Machine Controllers","publisher":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization","name":"SPLat Controls","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg","contentUrl":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg","caption":"SPLat Controls"},"image":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase\/2354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase"}],"about":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/types\/spl_knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/users\/1"}],"up":[{"embeddable":true,"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase\/2353"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=2354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}