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

首頁 > 編程 > ASP > 正文

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

2024-05-04 10:57:30
字體:
來源:轉載
供稿:網友
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
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 澜沧| 金阳县| 金平| 廉江市| 深水埗区| 木兰县| 霸州市| 富蕴县| 曲阜市| 城市| 成都市| 长宁区| 老河口市| 太白县| 天水市| 历史| 涿州市| 邢台市| 宝兴县| 高青县| 交城县| 鹿邑县| 金山区| 康保县| 丰城市| 昌江| 石城县| 炉霍县| 马尔康县| 阿勒泰市| 克山县| 青海省| 高雄县| 泸西县| 祁东县| 牙克石市| 绥阳县| 稻城县| 嘉黎县| 丰都县| 博湖县|