Both cint and clng can force a expression to be converted into a data type, and the introduction is an introduction. If the article id must be used, it is impossible for the article to have 32,767 articles.
Cint and clng meaning:
You can force an expression to a data type
The scope of data processing by cint and clng:
CInteger -32,768 to 32,767, decimal part rounded.
CLng Long -2,147,483,648 to 2,147,483,647, the decimal part is rounded.
The so-called overflow refers to exceeding the scope of processing data. The following code is the code to process data to prevent overflow. You can take a look at it yourself:
'Detection of whether it is a short integer
Copy the code as follows:sub Is_Int(string)
if len(abs(string))>10 then response.write Data overflow: response.end
if instr(string,-)<1 then
if cint(left(string,4)) >3276 and cint(right(string,1))>7 then response.write Data overflow: response.end
else
if cint(left(abs(string),4))>3276 and cint(right(string,1)) >8 then response.write Data overflow: response.end
end if
end sub
'
The code for copying is as follows:sub Is_Lng(string)
if len(abs(string))>10 then response.write Data overflow: response.end
if instr(string,-)<1 then
if clng(left (string,9))>214748364 and clng(right(string,1))>7 then response.write Data overflow: response.end
else
if clng(left(abs(string),9))>21478364 and clng(right (string,1))>8 then response.write Data overflow: response.end
end if
end sub