Skip to content

A simple checksum module, generally used to check if an ASCII file has changed.

License

Notifications You must be signed in to change notification settings

zoziha/checksum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Checksum

Language license

A simple checksum module, generally used to check if an ASCII file has changed.

Only FPM is supported, other build systems can copy the source file (./src/checksum.f90) directly.

Warning

There may be potential errors in this module, feedback and contributions are welcome.

Usage

To use checksum within your fpm project, add the following lines to your fpm.toml file:

[dependencies]
checksum = { git="https://github.com/zoziha/checksum" }

Example

> fpm run --example --all  # run the example
program example_checksum

    use checksum_module, only: checksum, read_whole_file
    implicit none

100 format(a, t50, i0)
    print 100, "checksum(""hello world""):", checksum('hello world')
    print 100, "checksum(read_whole_file(""./src/checksum.f90"")):", &
        checksum(read_whole_file('./src/checksum.f90'))

end program example_checksum
!> checksum("hello world"):                         436929629
!> checksum(read_whole_file("./src/checksum.f90")): -750348609

About

A simple checksum module, generally used to check if an ASCII file has changed.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published