{"id":2290,"date":"2025-04-15T09:35:50","date_gmt":"2025-04-15T09:35:50","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=2290"},"modified":"2025-06-11T05:57:04","modified_gmt":"2025-06-11T05:57:04","slug":"comrx_fgetnum-fw-d26","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/default-serial-port\/comrx_fgetnum-fw-d26\/","title":{"rendered":"ComRx_fGetNum fw [D>=26]"},"content":{"rendered":"\n<p>Return a decimal number from the head of the Rx buffer. 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>That 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><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o2825\">Dialect<\/a>\u00a0exclusions: Not available in dialects before 26<\/p>\n\n\n\n<p>See also<code> <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/default-serial-port\/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\/any-serial-port\/acomrx_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. Underscores represent space characters<\/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>123.456<\/td><td><code>xxxxxxxx<\/code><\/td><td>The first x terminates conversion<\/td><\/tr><tr><td><code>123.456_xxxxxxxx<\/code><\/td><td>123.456<\/td><td><code>_xxxxxxxx<\/code><\/td><td>The trailing space terminates conversion. It is not consumed.<\/td><\/tr><tr><td><code>____123.456xxxx<\/code><\/td><td>123<\/td><td><code>456xxxx<\/code><\/td><td>The 4 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><code>6xxxxxxx<\/code><\/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","protected":false},"excerpt":{"rendered":"<p>Return a decimal number from the head of the Rx buffer. Skip any leading spaces. Process leading + or &#8211;&nbsp;sign if present. Terminate on anything&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2285,"menu_order":4,"template":"","class_list":["post-2290","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>ComRx_fGetNum fw [D&gt;=26] - 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=\"ComRx_fGetNum fw [D&gt;=26] - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"Return a decimal number from the head of the Rx buffer. Skip any leading spaces. Process leading + or &#8211;&nbsp;sign if present. Terminate on anything...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/default-serial-port\/comrx_fgetnum-fw-d26\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-11T05:57:04+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\/communications-instructions\/default-serial-port\/comrx_fgetnum-fw-d26\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/default-serial-port\/comrx_fgetnum-fw-d26\/\",\"name\":\"ComRx_fGetNum fw [D>=26] - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-15T09:35:50+00:00\",\"dateModified\":\"2025-06-11T05:57:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/default-serial-port\/comrx_fgetnum-fw-d26\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/default-serial-port\/comrx_fgetnum-fw-d26\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/default-serial-port\/comrx_fgetnum-fw-d26\/#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\":\"Communications instructions\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Default Serial Port\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/default-serial-port\/\"},{\"@type\":\"ListItem\",\"position\":6,\"name\":\"ComRx_fGetNum fw [D>=26]\"}]},{\"@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":"ComRx_fGetNum fw [D>=26] - 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":"ComRx_fGetNum fw [D>=26] - SPLat Controls","og_description":"Return a decimal number from the head of the Rx buffer. Skip any leading spaces. Process leading + or &#8211;&nbsp;sign if present. Terminate on anything...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/default-serial-port\/comrx_fgetnum-fw-d26\/","og_site_name":"SPLat Controls","article_modified_time":"2025-06-11T05:57:04+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\/communications-instructions\/default-serial-port\/comrx_fgetnum-fw-d26\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/default-serial-port\/comrx_fgetnum-fw-d26\/","name":"ComRx_fGetNum fw [D>=26] - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-15T09:35:50+00:00","dateModified":"2025-06-11T05:57:04+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/default-serial-port\/comrx_fgetnum-fw-d26\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/default-serial-port\/comrx_fgetnum-fw-d26\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/default-serial-port\/comrx_fgetnum-fw-d26\/#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":"Communications instructions","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/"},{"@type":"ListItem","position":5,"name":"Default Serial Port","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/default-serial-port\/"},{"@type":"ListItem","position":6,"name":"ComRx_fGetNum fw [D>=26]"}]},{"@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\/2290","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\/2285"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=2290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}