VBScript Function Name Maximum Length
I'm wondering what the maximum allowed length of a functio开发者_运维知识库n name in Classic ASP (VBScript) is.
The following fails with identifier too long @ 256 characters
for i = 1 to 1024
execute "function " & string (i, "X") & ": end function"
WScript.echo i
next
I think it is 255, but you should not abuse it :)
From the MSDN reference for Function
:
name
Name of the Function; follows standard variable naming conventions.
And from the MSDN reference for Variables:
[...] A variable name:
- Must begin with an alphabetic character.
- Cannot contain an embedded period.
- Must not exceed 255 characters.
- Must be unique in the scope in which it is declared.
精彩评论