求出数字的位数(王蔚写的)

Fn GetNumberDigit inputNumber =
(
        digit = 0
        absNumber = abs(inputNumber )
        do
        (
                digit += 1
                absNumber /= 10.0
        )
        while absNumber >= 1
        digit
)

GetNumberDigit 999.999

posted on 2011-08-17 15:29  盖天00  阅读(131)  评论(0编辑  收藏  举报

导航