#define scope
Posted: 14 May 2011, 13:22 PM
I am using a #define to define the size of a queue for serial comms.
A function in a separate bas file needs to dimension (and initiialise) an array of the same size for recieving characters. If i try and reference the identifier declared in the main module i get a compiler error (reference to undefined identifier). if the code is not in a separate bas file i do not get the error.
i infer from this that the scope of identifiers does not extend to functions delcared in other files ?
If this is the case, what is the best way of achieving what i want without resorting to amending code in my separate source file that may be common to several main programs ?
thanks
A function in a separate bas file needs to dimension (and initiialise) an array of the same size for recieving characters. If i try and reference the identifier declared in the main module i get a compiler error (reference to undefined identifier). if the code is not in a separate bas file i do not get the error.
i infer from this that the scope of identifiers does not extend to functions delcared in other files ?
If this is the case, what is the best way of achieving what i want without resorting to amending code in my separate source file that may be common to several main programs ?
thanks