Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Associative array
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
==Language support== {{Main|Comparison of programming languages (associative array)}} Associative arrays can be implemented in any programming language as a package and many language systems provide them as part of their standard library. In some languages, they are not only built into the standard system, but have special syntax, often using array-like subscripting. Built-in syntactic support for associative arrays was introduced in 1969 by [[SNOBOL|SNOBOL4]], under the name "table". [[TMG (language)|TMG]] offered tables with string keys and integer values. [[MUMPS]] made multi-dimensional associative arrays, optionally persistent, its key data structure. [[SETL]] supported them as one possible implementation of sets and maps. Most modern scripting languages, starting with [[AWK]] and including [[Rexx]], [[Perl]], [[PHP]], [[Tcl]], [[JavaScript]], [[Maple (software)|Maple]], [[Python (programming language)|Python]], [[Ruby (programming language)|Ruby]], [[Wolfram Language]], [[Go (programming language)|Go]], and [[Lua (programming language)|Lua]], support associative arrays as a primary container type. In many more languages, they are available as library functions without special syntax. In [[Smalltalk]], [[Objective-C]], [[.NET Framework|.NET]],<ref>{{cite web |url=http://msdn.microsoft.com/en-us/library/xfhwa508.aspx |title=Dictionary<TKey, TValue> Class |publisher=MSDN}}</ref> [[Python (programming language)|Python]], [[REALbasic]], [[Swift (programming language)|Swift]], [[Visual Basic for Applications|VBA]] and [[Delphi (programming language)|Delphi]]<ref>{{Cite web|url=http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.Generics.Collections.TDictionary|title=System.Generics.Collections.TDictionary - RAD Studio API Documentation|website=docwiki.embarcadero.com|language=en|access-date=2017-04-18}}</ref> they are called ''dictionaries''; in [[Perl]], [[Ruby (programming language)|Ruby]] and [[Seed7]] they are called ''hashes''; in [[C++]], [[C_Sharp_(programming_language)|C#]], [[Java (programming language)|Java]], [[Go (programming language)|Go]], [[Clojure]], [[Scala (programming language)|Scala]], [[OCaml]], [[Haskell (programming language)|Haskell]] they are called ''maps'' (see [[map (C++)]], [[unordered_map (C++)]], and {{Javadoc:SE|java/util|Map}}); in [[Common Lisp]] and [[Windows PowerShell]], they are called ''hash tables'' (since both typically use this implementation); in [[Maple (software)|Maple]] and Lua, they are called ''tables''. In [[PHP]] and [[R (programming language)|R]], all arrays can be associative, except that the keys are limited to integers and strings. In JavaScript (see also [[JSON]]), all objects behave as associative arrays with string-valued keys, while the Map and WeakMap types take arbitrary objects as keys. In Lua, they are used as the primitive building block for all data structures. In [[Visual FoxPro]], they are called ''Collections''. The [[D (programming language)|D language]] also supports associative arrays.<ref>{{cite web |url=http://dlang.org/hash-map.html|title=Associative Arrays, the D programming language|publisher=Digital Mars}}</ref>
Summary:
Please note that all contributions to Niidae Wiki 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
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Associative array
(section)
Add topic