<-- Previous || Up || Next -->

Checksum 8 File Function
File Operations Class

Public Function Checksum8File( _
    ByVal vFileName As Variant _
    ) As Variant

"8-bit File Checksum"
Return the 8-bit checksum of a file.
The checksum is the sum of the ASCII values of all of the characters within the file.
Checksum is returned as a one-character string.
Uses modulo addition so that the function will return the 8 least significant bits of the sum.

       Checksum8("ABCD") = Chr$(10)
       StringToFile("ABCD", "C:\Test.Out") = True
    for example
       Checksum8File("C:\Test.Out") = Chr$(10)
See also:
    Checksum8 Function
    ChecksumXFile Function
    Checksum16File Function
    Checksum32File Function
vFileName: Name of the file for which the checksum will be calculated. Function returns Null if vFileName is Null or cannot be fixed-up to a string. Function returns Null if there is any type of error, such as when the file does not exist.
v1.1 Change: Function changed to return the checksum as a one-character String instead of an Integer in order to be consistent with the Checksum8 function.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.