Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zoziha/checksum
A simple checksum module, generally used to check if an ASCII file has changed.
https://github.com/zoziha/checksum
checksum fortran fortran-package-manager
Last synced: 25 days ago
JSON representation
A simple checksum module, generally used to check if an ASCII file has changed.
- Host: GitHub
- URL: https://github.com/zoziha/checksum
- Owner: zoziha
- License: mit
- Created: 2023-08-18T10:07:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-05T03:55:44.000Z (over 1 year ago)
- Last Synced: 2024-01-30T09:12:03.945Z (12 months ago)
- Topics: checksum, fortran, fortran-package-manager
- Language: Fortran
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Checksum
![Language](https://img.shields.io/badge/-Fortran-734f96?logo=fortran&logoColor=white)
[![license](https://img.shields.io/badge/License-MIT-pink)](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:
```toml
[dependencies]
checksum = { git="https://github.com/zoziha/checksum" }
```## Example
```sh
> fpm run --example --all # run the example
``````fortran
program example_checksumuse checksum_module, only: checksum, read_whole_file
implicit none100 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
```