Hash Input, Hash Write

Purpose

Loads a hash table from an ASCII file.

Syntax

Hash Input name[] , file$ | #n

Description

Hash Write 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 ASCII format and is be reloaded using Hash Input.

Example

Dim ha As Hash Variant

ha["new"] = 2.3

Hash Write ha[], App.Path & "\hash_ha.dat"

Hash Erase ha[]

Hash Input ha[], App.Path & "\hash_ha.dat"

Print ha["new"]

Kill App.Path & "\hash_ha.dat" // Tidy-up line

or

Dim ha As Hash Variant

ha["new"] = 2.3

Hash Write ha[], App.Path & "\hash_ha.dat"

Hash Erase ha[]

Open "hash_ha.dat" for Input As # 1

Hash Input ha[], # 1

Close # 1

Print ha["new"]

Kill App.Path & "\hash_ha.dat" // Tidy-up line

Remarks

See Hash for more information on the Hash table.

See Also

Hash Add, Hash Erase, Hash Load, Hash Remove, Hash Save, Hash Sort

{Created by Sjouke Hamstra; Last updated: 08/10/2014 by James Gaite}