Comparison of programming languages (associative array): Difference between revisions

Content deleted Content added
S-Lang: Add examples for Rust
Rust: removed "use" statement to be consistent with other languages. Corrected wording.
Line 1,674:
 
<syntaxhighlight lang="text">
use std::collections::HashMap;
let mut phone_book = HashMap::new();
phone_book.insert("Sally Smart", "555-9999");
Line 1,681 ⟶ 1,680:
</syntaxhighlight>
 
You can also loop through an associated array in a numberall ofentries waysthus:
 
<syntaxhighlight lang="text">