Loads or saves a hash table from a file.
Hash Load name[] , file$ | #n
Hash Save name[] , file$ | #n
Hash Save saves a hash table in the file file$ or in a file with channel #n, which is previously opened with Open. The hash table is stored in a fast binary format and is reloaded using Hash Load.
Dim ha As Hash Double // If this is variant, Hash Save/Load does not work
ha["new"] = 2.3
Hash Save ha[], App.Path & "\hash_ha.dat"
Hash Erase ha[]
Hash Load ha[], App.Path & "\hash_ha.dat"
Print ha["new"]
Kill App.Path & "\hash_ha.dat" // Tidy-up line
or
Dim ha As Hash Double // If this is variant, Hash Save/Load does not work
ha["new"] = 2.3
Hash Save ha[], App.Path & "\hash_ha.dat"
Hash Erase ha[]
Open "hash_ha.dat" for Input As # 1
Hash Load ha[], # 1
Close # 1
Print ha["new"]
Kill App.Path & "\hash_ha.dat" // Tidy-up line
See Hash for more information on the Hash table.
Hash Save/Load does not seem to work with Variants; use Hash Write/Input instead.
Hash Add, Hash Erase, Hash Input, Hash Remove, Hash Sort, Hash Write
{Created by Sjouke Hamstra; Last updated: 08/10/2014 by James Gaite}