{"id":1402,"date":"2014-12-08T11:12:02","date_gmt":"2014-12-08T03:12:02","guid":{"rendered":"http:\/\/blog.qdac.cc\/?p=1402"},"modified":"2014-12-08T11:12:02","modified_gmt":"2014-12-08T03:12:02","slug":"qxml%e6%9b%b4%e6%96%b0-%e4%bf%ae%e6%ad%a3%e4%ba%86%e7%94%b1%e4%ba%8eqstring-parsenumeric%e9%94%99%e8%af%af%e9%80%a0%e6%88%90asfloat%e5%b1%9e%e6%80%a7%e8%af%bb%e5%8f%96%e5%80%bc%e4%b8%8d%e6%ad%a3","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=1402","title":{"rendered":"QXML\u66f4\u65b0-\u4fee\u6b63\u4e86\u7531\u4e8eQString.ParseNumeric\u9519\u8bef\u9020\u6210AsFloat\u5c5e\u6027\u8bfb\u53d6\u503c\u4e0d\u6b63\u786e\u7684\u95ee\u9898"},"content":{"rendered":"<h4>\u3010\u95ee\u9898\u63cf\u8ff0\u3011<\/h4>\n<p>\u8be5\u95ee\u9898\u662f\u7531\u4e8eQString.ParseNumeric\u51fd\u6570\u5728\u89e3\u6790\u8d1f\u6570\u65f6\uff0c\u672a\u8fdb\u884c\u68c0\u6d4b\u9020\u6210\u89e3\u6790\u7684\u7ed3\u679c\u4e0e\u5b57\u7b26\u4e32\u8868\u8fbe\u5f0f\u7ed3\u679c\u4e0d\u4e00\u81f4\u9020\u6210\u7684\u3002\u95ee\u9898\u51fa\u5728QString.pas\u7684ParseNumeric.ParseDec\u51fd\u6570\uff1a<\/p>\n<pre class=\"lang:delphi decode:true \">if ACount &gt; 0 then\r\n     ANum := ANum + iVal \/ IntPower(10, ACount);<\/pre>\n<p>\u5e94\u4e3a\uff1a<\/p>\n<pre class=\"lang:delphi decode:true \">if ACount &gt; 0 then\r\n      begin\r\n      if ANum&lt;0 then\r\n        ANum:=ANum-iVal \/ IntPower(10, ACount)\r\n      else\r\n        ANum := ANum + iVal \/ IntPower(10, ACount);\r\n      end;<\/pre>\n<p>\u800cQXML.AsFloat\u5c5e\u6027\u5728\u8bfb\u53d6\u65f6\u4f7f\u7528\u4e86\u8be5\u65b9\u6cd5\uff0c\u9020\u6210\u672c\u95ee\u9898\u7684\u5b58\u5728\u3002<\/p>\n<h4>\u3010\u4e25\u91cd\u7ea7\u522b\u3011<\/h4>\n<p>\u4e25\u91cd<\/p>\n<h4>\u3010\u66f4\u65b0\u7ea7\u522b\u3011<\/h4>\n<p>\u7acb\u5373\u66f4\u65b0<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u95ee\u9898\u63cf\u8ff0\u3011 \u8be5\u95ee\u9898\u662f\u7531\u4e8eQString [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[8],"tags":[],"class_list":["post-1402","post","type-post","status-publish","format-standard","hentry","category-delphi"],"views":2028,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/1402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1402"}],"version-history":[{"count":1,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/1402\/revisions"}],"predecessor-version":[{"id":1403,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/1402\/revisions\/1403"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}