VBScript Function Name Maximum Length

I am wondering what the maximum allowable length of a function name in classic ASP (VBScript) is.

+4
source share
2 answers

I think it is 255, but you should not abuse it :)

From the MSDN link for Function :

name
Function name; Complies with standard naming conventions.

And from the MSDN help for Variables :

[...] Variable name:

  • You need to start with an alphabetic character.
  • Cannot contain an embedded period.
  • Must not exceed 255 characters.
  • Must be unique in the area in which it is declared.
+3
source

ID failed too long @ 256 characters

 for i = 1 to 1024 execute "function " & string (i, "X") & ": end function" WScript.echo i next 
+5
source

All Articles