Scope of global variables in Subroutine. (Release Announcements)

by Jim ⌂ @, Russell, KY, Monday, October 26, 2015, 23:30 (721 days ago) @ aprekates

You are correct, In many languages c, javaScript, ... the variables defined outside of a function are available globally. This often leads to very sloppy code with lots of globals, in beginning programmers. The BASIC I learned kept each function/subroutine as a separate variable context (except for the ones specifically set as global). Old habits.

Jim


Complete thread:

 RSS Feed of thread

powered by my little forum