Discuss Scratch
- Discussion Forums
- » Suggestions
- » Hashtables
- Monniasza_spzoo
-
100+ posts
Hashtables
Hashtables will store data, and its items will be referred to with text.
Useful with nested hashtables, multi-hashtables,hash-nested lists, treemaps and nested lists.
set [] of [ v] to [] :: #de3430 //create and/or set
reporter (get [] of [ v] :: #de3430) :: grey
predicate < hashtable [ v] contains key [thing] ? :: #de3430> :: grey
predicate < hashtable [ v] contains value [thing] ? :: #de3430> :: grey
remove [] from [ v] :: #de3430
set list [ v] to all keys of [ v] :: #de3430
reporter (length of hashtable [ v] :: #de3430) :: grey
Useful with nested hashtables, multi-hashtables,hash-nested lists, treemaps and nested lists.
Last edited by Monniasza_spzoo (Aug. 24, 2019 10:58:33)
- WindOctahedron
-
1000+ posts
Hashtables
(Removed - I didn't notice the “create and set”.)
Also, #de3430 will be the colour for hashtable blocks, if we won't find a better colour.
Also, #de3430 will be the colour for hashtable blocks, if we won't find a better colour.
Last edited by WindOctahedron (Aug. 24, 2019 10:38:21)
- Monniasza_spzoo
-
100+ posts
Hashtables
(Removed - I didn't notice the “create and set”.)Recolored according to post.
Also, #de3430 will be the colour for hashtable blocks, if we won't find a better colour.
- Monniasza_spzoo
-
100+ posts
Hashtables
Hashtables exist in Java under java.util.Map and java.util.Hashtable
- Discussion Forums
- » Suggestions
-
» Hashtables