国产探花免费观看_亚洲丰满少妇自慰呻吟_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
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 会理县| 麦盖提县| 汝州市| 凤阳县| 鄂伦春自治旗| 隆林| 南昌市| 五台县| 灌云县| 商都县| 隆德县| 侯马市| 华安县| 从化市| 蕉岭县| 松潘县| 汕尾市| 海城市| 五原县| 乌拉特后旗| 曲水县| 舞钢市| 普格县| 聂荣县| 鸡西市| 石泉县| 吴桥县| 内乡县| 凤台县| 龙川县| 门源| 黎城县| 黑龙江省| 莆田市| 杭锦后旗| 威海市| 台江县| 虹口区| 都江堰市| 红河县| 闵行区|