xcall MIAMEX, MX_HASHFILE, path, hash1, hash2, hash3, hash4
MX_HASHFILE returns the hash total for the specified field.
path must be set to the native (host operating system) format file specification of the file to get the hash off. (See MX_FSPEC to convert an AMOS fspec to a native fspec.)
hash1 through hash4 should each be a floating point, to receive the four parts of the hash.
Example
The following example illustrates the use of this function to display a hash total in the format used by DIR/H:
MAP1 HSHSTR,s,4 ! Octal string byte
MAP1 STRING'HASH,s,15 ! Display format hash-total (###-###-###-###)
xcall MIAMEX,MX_HASHFILE,THISIPATH,HASH1,HASH2,HASH3,HASH4
xcall MIAMEX,MX_OCVT,HASH1,3,OT_MEM+OT_OCT,HSHSTR
STRING'HASH = HSHSTR+"-"
xcall MIAMEX,MX_OCVT,HASH2,3,OT_MEM+OT_OCT,HSHSTR
STRING'HASH = STRING'HASH+HSHSTR+"-"
xcall MIAMEX,MX_OCVT,HASH3,3,OT_MEM+OT_OCT,HSHSTR
STRING'HASH = STRING_HASH+HSHSTR+"-"
xcall MIAMEX,MX_OCVT,HASH4,3,OT_MEM+OT_OCT,HSHSTR
STRING'HASH = STRING'HASH+HSHSTR
print STRING'HASH
Note that for display purposes, the standard AMOS and A-Shell hash-total formats treat the numeric values as octal.
For related and additional informating on hash methods, see DIGEST and HASH.