Problems with Const in VBScript Class?
Posted on 2003-11-24
Ok, I'm trying to be a "good" programmer by following the rules my professors drilled into my head years ago. I'm currently writing some administration scripts in VBScript and have encapsulated a lot of my code into various classes. Now I'm running to a problem when I declare a Const in the class, it gives me: "Syntax Error (800A03EA) Compilation Error" right at the point of declaring the Const. It doesn't matter if I create it as a Private or Public Const.
I'm betting if I change them to variables they'll work, but I'd rather stay away from that since I've been doing a good job of keeping the code clean so far. Is there a problem in VBScript that prevents declaring a Const in a class? If so, is there a work-around outside of using variables?