Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Dora Medina   on Aug 17 In MS Office Category.

  
Question Answered By: Hooriya Khan   on Aug 17

Although globals are a bad  idea as a general point, they are sometimes still
useful.

If your 10x10 array  is central to your processing, then by all means make it
global  array.

If you prefer, you can pass  a reference to it (ByRef) to subroutines. This
means there is still only one copy of the array for the subroutines to
change. However, having all routines work  on the same chunk of memory  via
parameters is no more structured than having them work on a global array.

If you are making it an array because it is indeed a 10x10 structured piece
of data, then that's fine. If you are arbitrarily grouping unrelated data
into an array, then you should consider a different way of holding the
information. (You haven't indicated why 10x10, so we don't know.)

It is unusual to want to access  all of your data from all of your
subroutines. Usually each subroutine  will only access a portion of your
information, to do its job. That information would normally then be held
local to the module that holds the subroutine.

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Storing an array in memory? Or get search suggestion and latest updates.


Tagged: