I've been migrating and cleaning up a bunch of ASP sites at my current job and I've come across a particular coding "technique" that I find annoying and very hard to follow and would greatly appreciate some opinions.
Here's an example:
<% sub MySub() Var1 = "foo" Var2 = "bar" End Sub %>
Although MySub has no arguments and can't return a value, after it's called two variables automagically appear. Amazing! I've also come across similar subroutines that create connections, recordsets, etc.
Now, if I'm not mistaken a Sub is Public by default, but IMHO no arguments and creating variables to use outside the scope of the sub is just asking for trouble. Is this some old school technique or just plain bad coding?