Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Adjacent stations/doc
(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!
== Terms == {{for|a more comprehensive overview of Lua|:mw:Extension:Scribunto/Lua reference manual}} * Lua has ''data types''. The ones relevant here are ''boolean'', ''string'', ''number'', and ''table''. ** A ''[[Boolean data type|boolean]]'' is either <code>true</code> or <code>false</code>. ** A ''string'' is text, stored as a list of characters. While Lua has several ways of indicating strings within code, in the Lua examples here, strings are indicated by enclosing text in double quotes (e.g. <code>"This is a string"</code>). ** A ''number'' is a numerical value, like <code>0.5</code> or <code>42</code>. ** A ''table'' is a structure that can contain other objects, including other tables. *** An empty table looks like <code>{}</code> in the code. *** Tables have ''keys'' and ''values'', which are typically of the structure <code>["<var>key</var>"] = <var>value</var></code>; each key–value pair is separated by a comma. All keys used here are strings or numbers. *** <code>{"text", "more text"}</code> is equivalent to <code>{[1] = "text", [2] = "more text"}</code>. * A ''variable'' can be defined using <code>local <var>variable_name</var> = <var>"value"</var>.</code> * ''Whitespace'' is any tab, line break or other space. Whitespace doesn't matter in Lua, but all examples here except for those inline with text are neatly indented for readability, with separate table keys on separate lines. * A ''return statement'' (e.g. <code>return <var>variable_name</var></code>) causes a function to exit and reports the value of <code><var>variable_name</var></code>. The "function" here is the code in the main module calling the subpage, and the <code><var>variable_name</var></code> should be the data table.
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)