From 5aab8cdaed4bba54d1e1d0529a3b603d13a405ea Mon Sep 17 00:00:00 2001 From: Diederik van Arkel Date: Mon, 3 Feb 2003 11:05:46 +0000 Subject: [PATCH] use rem instead of mod --- Ide/EdClient.icl | 2 +- Ide/PmDialogues.icl | 6 +++--- Pm/PmAbcMagic.icl | 2 +- Util/UtilOptions.icl | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Ide/EdClient.icl b/Ide/EdClient.icl index 3037f05..2e15643 100644 --- a/Ide/EdClient.icl +++ b/Ide/EdClient.icl @@ -851,7 +851,7 @@ where = doit (inc i) s l [c:m] (safemod (dec n) tabwidth) safemod x m - # s = x mod m + # s = x rem m | s <= 0 = s + m = s diff --git a/Ide/PmDialogues.icl b/Ide/PmDialogues.icl index f13339d..cbfd93f 100644 --- a/Ide/PmDialogues.icl +++ b/Ide/PmDialogues.icl @@ -821,8 +821,8 @@ IntToMemSize mem = kilomemstr; = memstr; where - mega = mem mod Mega == 0; - kilo = mem mod Kilo == 0; + mega = mem rem Mega == 0; + kilo = mem rem Kilo == 0; megamemstr = toString (mem / Mega) +++ "M"; kilomemstr = toString (mem / Kilo) +++ "K"; memstr = toString mem; @@ -926,7 +926,7 @@ FixedPointToString n = toString (n>>8); where first_digit=fraction / 10; - second_digit=fraction mod 10; + second_digit=fraction rem 10; fraction=toInt (toReal (n bitand 255) * 100.0 / 256.0); //-- path fiddling utils diff --git a/Pm/PmAbcMagic.icl b/Pm/PmAbcMagic.icl index 46d61f3..9582475 100644 --- a/Pm/PmAbcMagic.icl +++ b/Pm/PmAbcMagic.icl @@ -213,7 +213,7 @@ AC_Add path date info abccache #! c = {c & [i] = newstuff} = { abccache & cache = c - , curi = (inc i) mod ABCCacheSize + , curi = (inc i) rem ABCCacheSize , maxi = if (m < (dec ABCCacheSize)) i m } where diff --git a/Util/UtilOptions.icl b/Util/UtilOptions.icl index 979c216..6fe2547 100644 --- a/Util/UtilOptions.icl +++ b/Util/UtilOptions.icl @@ -285,7 +285,7 @@ ReadOptionsFile file | string.[offset] == ' ' = indentation (offset+1) (indent+1) string | string.[offset] == '\t' - = indentation (offset+1) (indent + (TabSize - (indent mod TabSize))) string + = indentation (offset+1) (indent + (TabSize - (indent rem TabSize))) string | otherwise = (indent, offset) -- GitLab