;;; -*- Mode:Lisp; Readtable:ZL; Package:USER; Base:8; Patch-File:T -*-
;;; Patch file for System version 124.65
;;; Reason:
;;;  (array-in-bounds-p) is supposed to return T IFF the subscripts it is
;;;  given are all legal for the array it is given.  It didn't require them
;;;  to be integers, and, in fact, blew up if the were non-numeric.
;;; Written 16-Jun-88 17:20:35 by pld (Peter L. DeWolf) at site Gigamos Cambridge
;;; while running on Cthulhu from band 1
;;; with Experimental System 124.63, Experimental Local-File 74.2, Experimental File-Server 23.1, Experimental Unix-Interface 12.0, Experimental ZMail 72.0, Experimental Tape 23.6, Experimental Lambda-Diag 16.2, microcode 1760, SDU Boot Tape 3.14, SDU ROM 8, the old ones.



; From modified file DJ: L.SYS; QRAND.LISP#497 at 16-Jun-88 17:20:54
#8R SYSTEM-INTERNALS#: 
(COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "SYSTEM-INTERNALS")))
  (COMPILER::PATCH-SOURCE-FILE "SYS: SYS; QRAND  "

(DEFUN ARRAY-IN-BOUNDS-P (ARRAY &REST SUBSCRIPTS)
  "T if the indices are in bounds for the dimensions of ARRAY."
  (CHECK-TYPE ARRAY ARRAY)
  (ASSERT (= (LENGTH SUBSCRIPTS) (ARRAY-RANK ARRAY)) ()
	  "The number of subscripts (~D) given does not equal the rank of ~S"
	  (LENGTH SUBSCRIPTS) ARRAY)
  (WHEN (= (LENGTH SUBSCRIPTS) (ARRAY-RANK ARRAY))
    (LOOP FOR S IN SUBSCRIPTS
	  FOR D = 0 THEN (1+ D)
       WHEN (OR (not (fixnump s)) (< S 0) ( S (ARRAY-DIMENSION ARRAY D)))
         DO (RETURN NIL)
       FINALLY (RETURN T))))

))
