aboutsummaryrefslogtreecommitdiff
path: root/src/interp/g-util.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-11-15 23:53:41 +0000
committerdos-reis <gdr@axiomatics.org>2008-11-15 23:53:41 +0000
commitafc7f65009d1bc682bc37bd96ddf5222ac37cc5b (patch)
tree1cbf2a3e57ddb2ef9515cbca325f6604b7d860f7 /src/interp/g-util.boot
parente906f65eed9a56f414d8dea0716acc03ddc6c8f0 (diff)
downloadopen-axiom-afc7f65009d1bc682bc37bd96ddf5222ac37cc5b.tar.gz
* interp/Makefile.pamphlet (OBJS): Remove cfuns. Include
hashcode. * interp/cfuns.lisp: Delete.
Diffstat (limited to 'src/interp/g-util.boot')
-rw-r--r--src/interp/g-util.boot15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index 155d7985..1d0efd2a 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -47,6 +47,21 @@ $interpOnly := false
--% Utility Functions of General Use
+
+++ tests if x is an identifier beginning with #
+isSharpVar x ==
+ IDENTP x and SCHAR(SYMBOL_-NAME x,0) = char "#"
+
+isSharpVarWithNum x ==
+ null isSharpVar x => nil
+ (n := QCSIZE(p := PNAME x)) < 2 => nil
+ ok := true
+ c := 0
+ for i in 1..(n-1) while ok repeat
+ d := ELT(p,i)
+ ok := DIGITP d => c := 10*c + DIG2FIX d
+ if ok then c else nil
+
mkList u ==
u => ["LIST",:u]
nil