aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-09-20 09:01:54 +0000
committerdos-reis <gdr@axiomatics.org>2009-09-20 09:01:54 +0000
commit2aad4262cc006f201d1e14f74561cf9d78b1596d (patch)
tree87152c470f4cca7ffc19339e01136599454ae9a7 /src/algebra
parentd9f5091a8a4653cf6a023c90f467016100dc5dfa (diff)
downloadopen-axiom-2aad4262cc006f201d1e14f74561cf9d78b1596d.tar.gz
* algebra/data.spad.pamphlet (size$Byte): Implement.
(index$Byte): Likewise. (lookup$Byte): Likewise. (random$Byte): Likewise.
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/data.spad.pamphlet4
-rw-r--r--src/algebra/strap/OUTFORM.lsp6
2 files changed, 9 insertions, 1 deletions
diff --git a/src/algebra/data.spad.pamphlet b/src/algebra/data.spad.pamphlet
index 2d84ac59..e5de8656 100644
--- a/src/algebra/data.spad.pamphlet
+++ b/src/algebra/data.spad.pamphlet
@@ -47,6 +47,10 @@ Byte(): Public == Private where
x >= y == byteGreaterEqual(x,y)$Foreign(Builtin)
min() == per 0
max() == per 255
+ size() == 256
+ index n == byte((n - 1) pretend NonNegativeInteger)
+ lookup x == (rep x + 1) pretend PositiveInteger
+ random() == byte random(size())$NonNegativeInteger
bitand(x,y) == bitand(x,y)$Foreign(Builtin)
bitior(x,y) == bitior(x,y)$Foreign(Builtin)
diff --git a/src/algebra/strap/OUTFORM.lsp b/src/algebra/strap/OUTFORM.lsp
index 9f6d60da..636f4db5 100644
--- a/src/algebra/strap/OUTFORM.lsp
+++ b/src/algebra/strap/OUTFORM.lsp
@@ -63,6 +63,9 @@
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%Thing|)
|OUTFORM;outputForm;Df$;14|))
+(PUT '|OUTFORM;outputForm;Df$;14| '|SPADreplace|
+ 'DFLOAT-FORMAT-GENERAL)
+
(DECLAIM (FTYPE (FUNCTION (|%String| |%Shell|) |%Thing|)
|OUTFORM;outputForm;S$;15|))
@@ -557,7 +560,8 @@
(DEFUN |OUTFORM;outputForm;S$;13| (|e| $) (DECLARE (IGNORE $)) |e|)
(DEFUN |OUTFORM;outputForm;Df$;14| (|f| $)
- (FORMAT NIL (|getShellEntry| $ 6) |f|))
+ (DECLARE (IGNORE $))
+ (DFLOAT-FORMAT-GENERAL |f|))
(DEFUN |OUTFORM;outputForm;S$;15| (|s| $)
(SPADCALL (|spadConstant| $ 27)