Compiler error message for undefined variables

Recommended Posts

The vast majority of my debug time with DAQFactory is finding where I've fat-fingered a variable name and got no compiler error messages...I just have to hunt through code to find places where I meant to type "test = 1" and actually typed "testr = 1". Everything just runs with no error messages, but whatever depended on test being 1 just fails. Without a global sequence search, I have to manually review 20 some sequence files to see what happened. In a similar situation, I just lost a half hour figuring out why my class instantiation was failing. I had typed

"private thing as new(classThing)"

and got no error messages! (too much VBA work I guess). I finally figured it out and changed it to

"private thing = new(classThing)"

and it then worked perfectly. The compiler must have been confused by the "as", but it did not complain.

I use DAQFactory extensively and exclusively for several large manufacturing control programs, and this would just be icing on the cake. It seems like it wouldn't be hard to have an option like Explicit that would throw errors for any symbol that the compiler didn't understand.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.