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!
===Other languages=== * In [[Python (programming language)|Python]] and [[MATLAB]] a global variable can be declared anywhere with the <code>global</code> keyword.<ref>{{cite web|title=What are the rules for local and global variables in Python?|url=https://docs.python.org/3/faq/programming.html#what-are-the-rules-for-local-and-global-variables-in-python|website=docs.python.org|publisher=Python Software Foundation|access-date=4 June 2020}}</ref><ref>{{cite web|title=Declare variables as global|url=http://in.mathworks.com/help/matlab/ref/global.html|website=in.mathworks.com|publisher=The MathWorks, Inc.|access-date=7 February 2015}}</ref> * [[Ruby (programming language)|Ruby]]'s global variables are distinguished by a '<code>$</code>' [[sigil (computer programming)|sigil]]. A number of predefined globals exist, for instance <code>$$</code> is the current [[process ID]].
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)