In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how to use vbscript to generate 36-ary automatic growth serial numbers, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.
Asp generates a 36-ary string of 0x9. Running the following example requires a browser that uses the IE core. Other non-IE core browsers do not support vbscript.
Implementation code:
Function getinitstring (l) 'initializes the 0 string of specified length l=l-1 for iS0 to l getinitstring= "0" & getinitstring nextend functionfunction getnextchar (chrcode)' to get the next character if chrcode=57 then' numeric and alphanumeric ascii incoherent Special processing is required for getnextchar= "a" else getnextchar=chr (chrcode+1) end ifend functionfunction getnextno (sjocal)'to get the string if trim (s) that increments 1 from "" then' initialization string getnextno=getinitstring (l): exit function end if l=len (s)-1 dim a (): redim a (l) for ionomer 0 to l' is split into an array a (I) = mid (s) 1) next carry=false' carry flag for ionoml to 0 step-1 'traverses chrcode=asc (a (I)) if carry then if chrcode122 then' from the lowest bit, not z Exit the for loop after increment, otherwise continue to carry a (I) = getnextchar (chrcode): exit for' exit loop elseif item0 then getnextno= "has reached the maximum length and cannot continue to carry. Need to modify the length ": exit function end if end if if a (I) =" z "then carry=true:a (I) =" 0 "else a (I) = getnextchar (chrcode): exit for' exit loop end if next for item0 to l' combination returns the string getnextno=getnextno&a (I) nextend functions="initlen=6s=getnextno (sforce initlen) msgbox s'000000s=getnextno (sdjinitlen) msgbox msgbox 000001s =" aaazzz "s=getnextno (smae initlen) msgbox sendaab000s =" zzzzzz "s=getnextno (s) Initlen) msgbox s' has reached its maximum length Can not continue to carry, need to modify the length of thank you to read this article carefully, I hope the editor to share the "how to use vbscript to generate 36-ary automatic growth serial number" this article is helpful to you, but also hope that you support more, pay attention to the industry information channel, more related knowledge waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.