欧美特黄不卡,涩涩视频在线,成人国产精品一区二区网站,亚洲一区二区三区欧美

當(dāng)前位置:雨林木風(fēng)下載站 > 技術(shù)開發(fā)教程 > 詳細(xì)頁面

檢測整數(shù)與長整數(shù)的函數(shù)

檢測整數(shù)與長整數(shù)的函數(shù)

更新時間:2022-05-02 文章作者:未知 信息來源:網(wǎng)絡(luò) 閱讀次數(shù):

經(jīng)常見到cint和clng的溢出出錯,如果有檢測函數(shù)就不會出這個問題,下面這兩個函數(shù)是應(yīng)朋友要求寫的,看一下吧

'檢測字符串是否是整數(shù)
function Is_Int(a_str)
   if not isnumeric(a_str) or len(str) > 5 then
      Is_Int = false
      exit function
   elseif len(str) < 5 then
      Is_Int = true
      exit function
   end if   
   if cint(left(a_str , 4)) > 3276 then
      Is_Int = false
      exit function
   elseif cint(left(a_str , 4)) = 3276 and cint(right(a_str , 1)) > 7 then
      Is_Int = false
      exit function
   else
      Is_Int = true
      exit function
   end if   
end function

'檢測是否是長整數(shù)
function Is_Lng(a_str)
   if not isnumeric(a_str) or len(str) > 10 then
      Is_Lng = false
      exit function
   elseif len(str) < 10 then
      Is_Lng = true
      exit function
   end if   
   if clng(left(a_str , 9)) > 214748367 then
      Is_Lng = false
      exit function
   elseif clng(left(a_str , 9)) = 214748367 and clng(right(a_str , 1)) > 7 then
      Is_Lng = false
      exit function
   else
      Is_Lng = true
      exit function
   end if   
end function

溫馨提示:喜歡本站的話,請收藏一下本站!

本類教程下載

系統(tǒng)下載排行

主站蜘蛛池模板: 湖州市| 新密市| 盖州市| 云南省| 七台河市| 洛南县| 黔江区| 阜宁县| 宾川县| 桃源县| 顺义区| 正宁县| 喜德县| 浪卡子县| 海原县| 琼海市| 永新县| 安徽省| 朝阳县| 军事| 宁德市| 双江| 双柏县| 闽侯县| 托克托县| 安岳县| 泸定县| 邳州市| 苍山县| 成都市| 东乡县| 射洪县| 和顺县| 新巴尔虎右旗| 敦煌市| 北辰区| 得荣县| 奉贤区| 邵阳县| 长泰县| 翼城县|