Re: FindFirstFile Possible Memory Leak



"Robert Morley" <rmorley@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:uqZK4kXrHHA.5092@xxxxxxxxxxxxxxxxxxxxxxx
Of course, if he'd Dim'd his variables up top, like most people do,

Actually most don't. Dimming at the top is just one of those things that is
considered the done thing in VB but no-one can give a good reason why they
do it. In other languages it's possible to reduce the scope of a variable
down even further so it only exists in a for loop or inside an if statement.
In these languages it makes sense to dim the variable with the minimum
amount of scope possible.

It also doesn't make any sense to me why we have all the code to perform a
certain task in a block but with the dims elsewhere.

Michael


.



Relevant Pages

  • Functional languages vs. hybrids (was Re: How does Ruby compare to Python?? How good is DESIGN ofRub
    ... pure functional languages can prove facts about the code ... If you add nested functions, but not function pointers, you still don't ... variables and parameters, and the global scope, you need to add all the ...
    (comp.lang.python)
  • Re: Ada exception block does NOT work?
    ... generally exceptions ... But as we know from SPARK, use of Ada in such environments ... > have propagated out of the scope of their definitions. ... C-like languages do not. ...
    (comp.lang.ada)
  • Re: Javascript taking over?
    ... in C and C++, one doesn't need to know the scope to parse correctly, but do ... most non-C-family languages are like this. ... JIT'ed for each unique combination of input types it encounters). ... static compilers and linkers, meaning the language would essentially be ...
    (comp.lang.misc)
  • Re: Is VB Caca??
    ... It warns you because you are declaring a variable in the scope that hides a variable with the same name with a larger scope. ... Mike Ober. ... Dim s As String ...
    (microsoft.public.dotnet.languages.vb)
  • Re: The "new age" of html?
    ... DIM A ... Evolving languages can be tricky though because you don't ... Yes you want to keep the syntax in the general style of BASIC. ... then people can just use Objects as dictionaries. ...
    (alt.html)

Loading