>>What level of scoping do I set a variable to in a procedure within a PRG so that it is available throughout the program? Do I have to define them at the program level before any procedures that contain them are called? Hate using PUBLIC if I don't have to.
>
>If you set the variable private it would be visible down in the calling chain.
Actually, that's not correct - as long as a variable isn't LOCAL it will be 'visible' to any called modules.
The purpose of PRIVATE is to hide any *previous* instance of the same variable name, beginning at where the PRIVATE is declared and continuing through any called module. A PRIVATE declaration does not cause the creation of any memory variable.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only