国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 編程 > ASP > 正文

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

2024-05-04 11:00:48
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
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
發(fā)表評(píng)論 共有條評(píng)論
用戶(hù)名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 遂宁市| 确山县| 全州县| 滁州市| 深水埗区| 辽宁省| 天峨县| 都昌县| 伊通| 梁河县| 格尔木市| 集贤县| 云和县| 清水河县| 吐鲁番市| 富川| 朝阳区| 房产| 加查县| 德阳市| 武夷山市| 清徐县| 安宁市| 东宁县| 和田县| 德惠市| 安溪县| 黑河市| 吴川市| 留坝县| 和政县| 黔东| 罗山县| 盐源县| 大埔区| 明水县| 新兴县| 咸阳市| 天镇县| 肥东县| 逊克县|