From 8b424a73bdf2d02563dbf166b9dd47e9d887d364 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Mon, 3 Dec 2007 22:54:12 +0000 Subject: * vmlisp.lisp (CGREATERP): Return canonical truthvalue. --- src/interp/ChangeLog | 4 ++++ src/interp/vmlisp.lisp | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/interp') diff --git a/src/interp/ChangeLog b/src/interp/ChangeLog index 2c4a741d..462d22fa 100644 --- a/src/interp/ChangeLog +++ b/src/interp/ChangeLog @@ -1,3 +1,7 @@ +2007-12-03 Gabriel Dos Reis + + * vmlisp.lisp (CGREATERP): Return canonical truthvalue. + 2007-12-03 Gabriel Dos Reis * pf2sex.boot (pf2Sex1): Be talkative about why a parse form is Wrong. diff --git a/src/interp/vmlisp.lisp b/src/interp/vmlisp.lisp index c2d66fd9..e422fa18 100644 --- a/src/interp/vmlisp.lisp +++ b/src/interp/vmlisp.lisp @@ -1039,7 +1039,13 @@ (defun CHAR2NUM (c) (char-code (character c))) -(defun CGREATERP (s1 s2) (string> (string s1) (string s2))) +;; Returns truthvalue (nil or t) if s1 compares lexicographically +;; greater than s2. Note: It is essential that this function returns +;; a canonical Boolean value because parts of the system use it in +;; contexts where generalized Boolean values are confusing. +(defun CGREATERP (s1 s2) + (cond ((string> (string s1) (string s2)) t))) + (define-function 'STRGREATERP #'CGREATERP) -- cgit v1.2.3