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

首頁 > 編程 > ASP > 正文

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

2020-07-27 13:00:21
字體:
來源:轉載
供稿:網友
Rem 將字符串轉換為整形數據
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 將字符串轉換為雙精度型數據
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 將字符串轉換為布爾數據
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
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 莫力| 宿松县| 和平区| 新宁县| 讷河市| 昌黎县| 错那县| 宁都县| 西林县| 革吉县| 古丈县| 开化县| 阳高县| 比如县| 维西| 吐鲁番市| 偃师市| 应用必备| 阿坝| 炉霍县| 通化县| 沂水县| 江永县| 松潘县| 张家界市| 昌都县| 沅陵县| 开化县| 霸州市| 闻喜县| 班玛县| 华容县| 新巴尔虎左旗| 陕西省| 屯门区| 三门县| 北安市| 武冈市| 吴旗县| 奎屯市| 莱州市|