Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

13
  • 1
    If you use functions, but make their variables global, you haven't actually gained much ;-) Commented Dec 27, 2012 at 8:57
  • 5
    "I'm using functions so that my program won't be a mess", so just don't and refactor your code so that you wont need them. Commented Dec 27, 2012 at 8:58
  • No, I will not make all their variables global, probably just a few. Commented Dec 27, 2012 at 8:58
  • 3
    So what? Still neither necessary nor good. Use return values and parameters. Commented Dec 27, 2012 at 9:00
  • 2
    Can you give us a short example of how you'd be using global values? (Edit your question) We might be able to suggest a better approach. Commented Dec 27, 2012 at 9:04