Sign in Join
Wiki copytemporary

ISO 7064/fr: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: ISO 7064/fr

OldNewLine
1+La norme [ISO 7064](https://en.wikipedia.org/wiki/ISO_7064) spécifie un ensemble de systèmes de caractères de contrôle capable de protéger des chaînes contre les erreurs de saisie.
2+
3+## Fonction StrMOD97
4+
5+La fonction StrMOD97 peut encoder et vérifier la somme de contrôle selon ISO 7064 mode 97 10.
6+
7+``` pascal
8+
9+function StrMOD97( s :String):integer;
10+const
11+ modu = 97;
12+var
13+ sx :String;
14+ isx,ic,p:Integer;
15+begin
16+ p := Length( s );
17+ while( p > 9 ) do
18+ begin
19+ sx := Copy( s, 1, 9 );
20+ Delete( s, 1, 9 );
21+ isx := StrToInt( sx );
22+ ic := isx mod modu;
23+ s := IntToStr( ic ) + s;
24+ p := Length( s );
25+ end;
26+ isx := StrToInt( s );
27+ if isx >= modu
28+ then ic := isx mod modu
29+ else ic := isx;
30+ result := ic;
31+end;
32+```
33+
34+---
35+*From the Free Pascal wiki, page "ISO 7064/fr", as it stood on 2020-02-18 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history