Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Global variable
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Global-only and global-by-default== A number of non-[[structured programming|structured]] languages, such as (early versions of) [[BASIC]], [[COBOL]] and [[Fortran]] I (1956) only provide global variables. Fortran II (1958) introduced subroutines with local variables, and the COMMON keyword for accessing global variables. Usage of COMMON in FORTRAN continued in FORTRAN 77,<ref>{{cite web|url=https://web.stanford.edu/class/me200c/tutorial_77/13_common.html|title=Fortran 77 Tutorial}}</ref> and influenced later languages such as PL/SQL. Named COMMON groups for globals behave somewhat like structured namespaces.<ref>{{cite web|url=http://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Companion/first_steps/stack_and_heap.html|title=First Steps: Stack & Heap Objects}}</ref> Variables are also global by default in [[Forth (programming language)|Forth]], [[Lua (programming language)|Lua]], [[Perl]], and most shells.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)