最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

ASP字符串轉(zhuǎn)換為整形、雙精度型、布爾

 更新時(shí)間:2008年05月15日 23:28:40   作者:  
asp可以輕松將字符串類型轉(zhuǎn)化為其它類型的函數(shù)
Rem 將字符串轉(zhuǎn)換為整形數(shù)據(jù)
function toInteger(str,num)
        str=trim(str)
        if str="" or not isnumeric(str) then
              toInteger=num
        else
              toInteger=clng(str)
        end if
end function

Rem 將字符串轉(zhuǎn)換為雙精度型數(shù)據(jù)
function toDouble(str)
       str=trim(str)
       if str="" or not isnumeric(str) then
              toDouble=0.0
      else
              toDouble=cdbl(str)
      end if
end function

Rem 將字符串轉(zhuǎn)換為布爾數(shù)據(jù)
function toBoolean(str)
      str=lcase(trim(str))
      if str="true" or str="t" then
            toBoolean=true
     elseif isnumeric(str) then
            if clng(str)<>0 then toBoolean=true
     else
           toBoolean=false
    end if
end function

相關(guān)文章

最新評(píng)論

炎陵县| 师宗县| 宁夏| 连州市| 武陟县| 贵南县| 吉安市| 富民县| 扎兰屯市| 多伦县| 新建县| 乃东县| 芮城县| 镇赉县| 永定县| 东光县| 固安县| 台南市| 襄汾县| 博客| 金华市| 海盐县| 海兴县| 璧山县| 南宁市| 禹城市| 龙胜| 城步| 板桥市| 大丰市| 铜川市| 沂南县| 会宁县| 应城市| 台南县| 许昌县| 林芝县| 济南市| 云龙县| 胶南市| 莱州市|