{"id":190,"date":"2019-05-06T11:14:17","date_gmt":"2019-05-06T03:14:17","guid":{"rendered":"http:\/\/www.hefeiyu.com\/?p=190"},"modified":"2019-05-06T11:35:51","modified_gmt":"2019-05-06T03:35:51","slug":"4gl%e6%95%b0%e5%ad%97%e9%87%91%e9%a2%9d%e8%bd%ac%e5%a4%a7%e5%86%99%e6%b1%89%e5%ad%97%e9%87%91%e9%a2%9d","status":"publish","type":"post","link":"https:\/\/www.hefeiyu.com\/?p=190","title":{"rendered":"4gl\u6570\u5b57\u91d1\u989d\u8f6c\u5927\u5199\u6c49\u5b57\u91d1\u989d"},"content":{"rendered":"<div id=\"content_views\" class=\"htmledit_views\">\n<p><span style=\"font-family: 'KaiTi_GB2312'; font-size: 18px; color: #000099;\"><strong>\u9996\u5148\u770b\u5f20\u6548\u679c\u56fe\uff1a\u6ce8\u610f\u5e95\u8272\u90e8\u5206<\/strong><\/span><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.hefeiyu.com\/wp-content\/uploads\/2019\/05\/1348896985_1285.jpg\" alt=\"\" \/><\/p>\n<p><span style=\"font-family: 'KaiTi_GB2312'; font-size: 18px; color: #000099;\"><strong>\u5b9e\u73b0\u51fd\u6570\u4ee3\u7801\uff1a<\/strong><\/span><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">\r\nFUNCTION F_CONV_GB(pf_money)\r\nDEFINE pf_money    DECIMAL(14,2)\r\nDEFINE ll_money    INTEGER\r\nDEFINE i           SMALLINT\r\nDEFINE li_bit      SMALLINT\r\nDEFINE li_length   SMALLINT\r\nDEFINE li_len      SMALLINT\r\nDEFINE ls_money    CHAR(20)\r\nDEFINE ls_result   CHAR(64)\r\nDEFINE ls_arr_num    ARRAY[10] OF CHAR(2)\r\nDEFINE ls_arr_unit   ARRAY[14] OF CHAR(2)\r\nDEFINE ls_arr_unit0  ARRAY[14] OF CHAR(2)\r\n   LET  ls_arr_num[1]='\u58f9'\r\n   LET  ls_arr_num[2]='\u8d30'\r\n   LET  ls_arr_num[3]='\u53c1'\r\n   LET  ls_arr_num[4]='\u8086'\r\n   LET  ls_arr_num[5]='\u4f0d'\r\n   LET  ls_arr_num[6]='\u9646'\r\n   LET  ls_arr_num[7]='\u67d2'\r\n   LET  ls_arr_num[8]='\u634c'\r\n   LET  ls_arr_num[9]='\u7396'\r\n   LET  ls_arr_num[10]='\u96f6'\r\n   LET  ls_arr_unit[1]='\u5206'\r\n   LET  ls_arr_unit[2]='\u89d2'\r\n   LET  ls_arr_unit[3]='\u5143'\r\n   LET  ls_arr_unit[4]='\u62fe'\r\n   LET  ls_arr_unit[5]='\u4f70'\r\n   LET  ls_arr_unit[6]='\u4edf'\r\n   LET  ls_arr_unit[7]='\u4e07'\r\n   LET  ls_arr_unit[8]='\u62fe'\r\n   LET  ls_arr_unit[9]='\u4f70'\r\n   LET  ls_arr_unit[10]='\u4edf'\r\n   LET  ls_arr_unit[11]='\u4ebf'\r\n   LET  ls_arr_unit[12]='\u62fe'\r\n   LET  ls_arr_unit[13]='\u4f70'\r\n   LET  ls_arr_unit[14]='\u4edf'\r\n   LET  ls_arr_unit0[1]='\u6574'\r\n   LET  ls_arr_unit0[2]='\u96f6'\r\n   LET  ls_arr_unit0[3]='\u5143'\r\n   LET  ls_arr_unit0[4]='\u96f6'\r\n   LET  ls_arr_unit0[5]='\u96f6'\r\n   LET  ls_arr_unit0[6]='\u96f6'\r\n   LET  ls_arr_unit0[7]='\u4e07'\r\n   LET  ls_arr_unit0[8]='\u96f6'\r\n   LET  ls_arr_unit0[9]='\u96f6'\r\n   LET  ls_arr_unit0[10]='\u96f6'\r\n   LET  ls_arr_unit0[11]='\u4ebf'\r\n   LET  ls_arr_unit0[12]='\u96f6'\r\n   LET  ls_arr_unit0[13]='\u96f6'\r\n   LET  ls_arr_unit0[14]='\u96f6'\r\n \r\n ##\u5982\u679c\u53c2\u6570\u4e3a0\r\n IF pf_money=0 THEN RETURN '\u96f6\u5143\u6574'  END IF\r\n \r\n ##\u53c2\u6570\u5c0f\u4e8e\u96f6\uff0c\u5219\u4e3a\u8d1f\u503c\r\n IF pf_money&lt;0 THEN\r\n    LET  pf_money=0-pf_money\r\n    LET  ls_result='\u8d1f'\r\n ELSE\r\n    LET  ls_result=''\r\n END IF\r\n \r\n ##\u5224\u65ad\u662f\u5426\u8d85\u51fa\u8303\u56f4\r\n IF pf_money&gt;999999999999.99 THEN\r\n    RETURN ls_result='\u6570\u503c\u8d85\u51fa\u8303\u56f4'\r\n END IF\r\n##\u5faa\u73af\u6bcf\u4e00\u4e2a\u6570\u5b57\r\nLET ls_money=pf_money*100 USING\"&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;\"\r\nLET li_length=length(ls_money CLIPPED)\r\nFOR i=1 to li_length\r\n  LET li_bit=ls_money[i]\r\n    IF  li_bit=0 then\r\n       LET li_len=length(ls_result  CLIPPED)\r\n       IF ls_result[li_len-1,li_len]&lt;&gt;'\u96f6'then \r\n            LET ls_result=ls_result  CLIPPED,ls_arr_unit0[li_length-i+1]\r\n       ELSE\r\n            LET ls_result=ls_result[1,li_len-2],ls_arr_unit0[li_length-i+1]\r\n       END IF \r\n   ELSE\r\n       LET ls_result=ls_result CLIPPED,ls_arr_num[li_bit],ls_arr_unit[li_length-i+1]\r\n   END IF\r\nEND  FOR\r\n  return ls_result CLIPPED    ##\u8fd4\u56de\u5927\u5199\r\nEND \r\nFUNCTION<\/code><\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1a<a href=\"https:\/\/www.hefeiyu.com\">\u8d6b\u975e\u57df<\/a> &raquo; <a href=\"https:\/\/www.hefeiyu.com\/?p=190\">4gl\u6570\u5b57\u91d1\u989d\u8f6c\u5927\u5199\u6c49\u5b57\u91d1\u989d<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148\u770b\u5f20\u6548\u679c\u56fe\uff1a\u6ce8\u610f\u5e95\u8272\u90e8\u5206 \u5b9e\u73b0\u51fd\u6570\u4ee3\u7801\uff1a FUNCTION F_CONV_GB(pf_money) DEFINE pf_money DECIMAL(14,2) DEFINE ll_money INTEGER DEFINE i SMALLINT D [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[60,36],"class_list":["post-190","post","type-post","status-publish","format-standard","hentry","category-4gl","tag-4gl","tag-tiptop"],"_links":{"self":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=190"}],"version-history":[{"count":3,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/190\/revisions"}],"predecessor-version":[{"id":194,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/190\/revisions\/194"}],"wp:attachment":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}