diff options
author | dos-reis <gdr@axiomatics.org> | 2008-10-04 21:41:59 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-10-04 21:41:59 +0000 |
commit | 27362ea43a4c1da88e23e3014c0fcb66ef7a2cfc (patch) | |
tree | 694dd39bfbf42232b8442f130fdeef5559bb3803 /src/algebra/data.spad.pamphlet | |
parent | 6003eafb8c0985ecd933d33dfa723d0119a88063 (diff) | |
download | open-axiom-27362ea43a4c1da88e23e3014c0fcb66ef7a2cfc.tar.gz |
* algebra/data.spad.pamphlet (sample$Byte): New.
Diffstat (limited to 'src/algebra/data.spad.pamphlet')
-rw-r--r-- | src/algebra/data.spad.pamphlet | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/algebra/data.spad.pamphlet b/src/algebra/data.spad.pamphlet index b491d001..e290fcd6 100644 --- a/src/algebra/data.spad.pamphlet +++ b/src/algebra/data.spad.pamphlet @@ -37,14 +37,15 @@ Byte(): Public == Private where ++ bitand(x,y) returns the bitwise `and' of `x' and `y'. bitior: (%,%) -> % ++ bitor(x,y) returns the bitwise `inclusive or' of `x' and `y'. - + sample: () -> % + ++ sample() returns a sample datum of type Byte. Private == add import Character byte(x: NonNegativeInteger): % == not (x < 256$Lisp) => userError "integer value cannot be represented by a byte" x : % - + sample() = byte(0@NonNegativeInteger) hash x == SXHASH(x)$Lisp coerce(x: NonNegativeInteger): % == byte x |