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

ASP字符串轉換為整形、雙精度型、布爾

 更新時間:2008年05月15日 23:28:40   作者:  
asp可以輕松將字符串類型轉化為其它類型的函數(shù)
Rem 將字符串轉換為整形數(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 將字符串轉換為雙精度型數(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 將字符串轉換為布爾數(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

相關文章

最新評論

寿阳县| 汝阳县| 南通市| 建昌县| 池州市| 弋阳县| 阿城市| 海宁市| 石泉县| 禄丰县| 万年县| 洛宁县| 宜章县| 黔西县| 阜宁县| 宣恩县| 贵溪市| 搜索| 高邑县| 拜泉县| 探索| 延川县| 双江| 长宁县| 黄石市| 东兰县| 紫阳县| 浑源县| 房产| 叶城县| 望奎县| 华安县| 德昌县| 沐川县| 全州县| 广丰县| 贵州省| 定边县| 钟山县| 闻喜县| 侯马市|