Re: Declaring variables in Module vs. Public

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



There is a difference, because the variables will be in scope for the whole
project, but in reality you probably won't notice it. There is a bigger
question over design, structure, etc., but by going to multiple modules you
are starting to think along the right lines.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Jeff" <Jeff@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:21FCD08D-CC75-4172-B039-EBB85C3B4344@xxxxxxxxxxxxxxxx
Hi,

I have written code and there are a number of variables that are declared
at
the top of the module - so they can be used by all subs in the module.

I am expanding the code and am considering separating the new added code
into a different module because it would be organized a little better.

My question is - is there a performance difference to declaring the
variables public rather then "Module" wide. Any advice under what
circumstances to break code into different modules and when to declare
public
vs module wide.

I have 1 module now, but I could break up the code into 6 modules that
have
product specific data. All the variables would have to change to public
because they are common in the 6 modules.

Thanks for your help


.



Relevant Pages

  • Re: Seriously, What Can We Do About It?
    ... reality that produces those results. ... Declaring that the model doesn't represent reality ANYWAY is ... Time dilation ... regardless of what other observers see. ...
    (sci.physics.relativity)
  • Re: Seriously, What Can We Do About It?
    ... reality that produces those results. ... Declaring that the model doesn't represent reality ANYWAY is ... regardless of what other observers see. ... Simply to declare nonsimultaneity to exist independently ...
    (sci.physics.relativity)
  • Re: Declaring variables in Module vs. Public
    ... Splitting up the code into modules - more organized, ... "Jim Thomlinson" wrote: ... My question is - is there a performance difference to declaring the ... circumstances to break code into different modules and when to declare ...
    (microsoft.public.excel.misc)
  • Re: Declaring variables in Module vs. Public
    ... I also recommend keeping your varaibles as private as possible. ... "Jim Thomlinson" wrote: ... My question is - is there a performance difference to declaring the ... circumstances to break code into different modules and when to declare ...
    (microsoft.public.excel.misc)
  • Re: map/filter/reduce/lambda opinions and background unscientific mini-survey
    ... > Lambda serves a very specific purpose: declaring small, ... > functions which are no bigger than a single expression. ...
    (comp.lang.python)