vb6 - Making the VB compiler warn when I don't declare variables properly -
how can make vb6 compiler fail when forget declare variable?
this stop various typing errors (both keyboard , data types) , errors this when tries access unexpected.
problems caused not correctly declaring variables:
- unexplained errors when using undefined variable, in fact pointing somehting else
- variables having different values @ different times, due spelling mistakes
- trying access variables outside of scope appearing uninitialised
you should use option explicit
. should put on first line of every module , form's code section.
you can configure vb6 ide add automatically new modules going tools > options > require variable declaration.
Comments
Post a Comment