熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> PB編程 >> 正文

在PB中實現數字的英文大寫和中文大寫[2]

2022-06-13   來源: PB編程 
            if a< then
                B=RIGHTtrim(MID(aa(a )*+))
            else
                A=STRING(a
                A=INTEGER(MID(a))
                b=RIGHTtrim(mid(bb(a )*+))
                a=INTEGER(MID(a))
                if a< > then
                    B=RIGHTtrim(b++MID(aa(a )*+)) 
                end if
            end if
            W=b+w 
        end if
        A=INTEGER(MID(ccm ))
        //*** 的數 ***
        if a< > then
            b=RIGHTtrim(mid(aa(a )*+))+ HUNDRED  
            if w< > and m= then
                b=b+AND  
            end if
            w=b+w 
        end if
    end if
    m=m
    LOOP
    //*** 小數處理 ***
    if w= then
        w=ZERO
    end if
    if t< > AND T< > then
        w=trim(w)+ & +t+/
    end if
    //*** 結果 > w
    return w

    中文大寫轉換

    以下是進行中文大寫轉換的函數內容函數名為dtormb 
    decimal y
    string jexhzhzehfm
    int ba
    y=mje
    X = trim(string(Y))
    B = len(X)
    A =
    E = mid(XA)
    HZ = 零壹貳三肆伍陸柒捌玖
    HZ = 仟佰拾億仟佰拾萬仟佰拾元
    JE =
    do while E< >
    H = mid(HZinteger(E)*+)
    F = mid(HZ (B A)* )
    if E< > or (E= and (F= or F= or F=)) then
        JE = trim(JE)+H+F

[]  []  []  


From:http://tw.wingwit.com/Article/program/PB/201311/11116.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.