aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/data.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-03-12 17:04:43 +0000
committerdos-reis <gdr@axiomatics.org>2011-03-12 17:04:43 +0000
commit52fddea19454dc2b9bcb54c6edd5a4cd4f5765a9 (patch)
tree4b13ccc6d57c7c1ee615c83615b246c98eae388a /src/algebra/data.spad.pamphlet
parent42d38bee45a64edfc12641053e58581c20584363 (diff)
downloadopen-axiom-52fddea19454dc2b9bcb54c6edd5a4cd4f5765a9.tar.gz
* src/algebra/: Systematically use negative? when comparing for
less than 0.
Diffstat (limited to 'src/algebra/data.spad.pamphlet')
-rw-r--r--src/algebra/data.spad.pamphlet6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/algebra/data.spad.pamphlet b/src/algebra/data.spad.pamphlet
index 102cd55e..5a04c4cb 100644
--- a/src/algebra/data.spad.pamphlet
+++ b/src/algebra/data.spad.pamphlet
@@ -113,7 +113,8 @@ SystemInteger(N: PositiveInteger): Public == Private where
Public == OrderedFinite with
sample: % ++ \spad{sample} gives a sample datum of this type.
Private == SubDomain(Integer, length #1 <= N) add
- sample == per(0@Integer)
+ import %icst0: % from Foreign Builtin
+ sample == %icst0
min == per(-shift(1,N-1))
max == per(shift(1,N-1)-1)
size() == (rep max - rep min + 1)::NonNegativeInteger
@@ -195,11 +196,12 @@ SystemNonNegativeInteger(N: PositiveInteger): Public == Private where
sample: %
++ \spad{sample} gives a sample datum of type Byte.
Private == SubDomain(NonNegativeInteger, length #1 <= N) add
+ import %icst0: % from Foreign Builtin
import %bitand: (%,%) -> % from Foreign Builtin
import %bitior: (%,%) -> % from Foreign Builtin
import %bitnot: % -> % from Foreign Builtin
- min == per 0
+ min == %icst0
max == per((shift(1,N)-1) : NonNegativeInteger)
sample == min
bitand(x,y) == %bitand(x,y)