Question

Coming from "good" old days where there were languages which such a limit, I am wondering:

Is there such a limit to the number of significant characters in identifiers in VBScript?

There used to be BASIC variants that limited the total number of characters to 8, or 16 (MSX computers, real old ROM basics). Then, Turbo Pascal (I think) and GW-BASIC (I believe) allowed arbitrarily long identifiers, but only the first 20 or so characters where significant, so VERYLONGNAMEWITHASUFFIX1 and VERYLONGNAMEWITHASUFFIX2 where considered to be the same identifier.

That´s anachronism we won´t find in today´s (ok, yesterday's, because it is not a current technology) VBScript, right?

I am not a big fan of very long identifiers, but I´m generating VBScript source code for immediate execution at runtime, and that one might fiddle around with long identifiers and must not be human-readable (considering the developer not being a normal human being).

Astoundingly, I failed to google this at bing, or google ^^

Was it helpful?

Solution

According to the docs:

Variable names follow the standard rules for naming anything in VBScript. 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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top