diff options
Diffstat (limited to 'lowlevelunit.pas')
-rw-r--r-- | lowlevelunit.pas | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lowlevelunit.pas b/lowlevelunit.pas index f08a80d..5dcf4aa 100644 --- a/lowlevelunit.pas +++ b/lowlevelunit.pas @@ -154,6 +154,7 @@ procedure readAnAndorString(var f: file; out s: string; checkEOL: boolean); over procedure splitStrToInt(s: string; out ia: tLongintArray); function vergleicheStrings(s1,s2: string): integer; +function pruefSumme(s: string; m: longestOrdinal): longestOrdinal; inline; var base64Chars: array[0..63] of char; @@ -1311,6 +1312,15 @@ begin result:=0; end; +function pruefSumme(s: string; m: longestOrdinal): longestOrdinal; +var + i: longint; +begin + result:=0; + for i:=1 to length(s) do + result:=((result*256)+ord(s[i])) mod m; +end; + var b: byte; |