Newsgroups: comp.lang.lisp.x
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!cs.utexas.edu!uunet!hearst.acc.Virginia.EDU!murdoch!usenet
From: "Steven D. Majewski" <sdm7g@Virginia.EDU>
Subject: xlispstat-3-37 vs 2.1R2 compatability
X-Sender: sdm7g@elvis.med.Virginia.EDU
Content-Type: TEXT/PLAIN; charset=US-ASCII
Message-ID: <Pine.A32.3.90.940901185529.19256A-100000@elvis.med.Virginia.EDU>
To: Xlisp List <stat-lisp-news@umnstat.stat.umn.edu>
Sender: usenet@murdoch.acc.Virginia.EDU
Organization: University of Virginia
Mime-Version: 1.0
Date: Thu, 1 Sep 1994 23:27:05 GMT
Lines: 83



I just built xlispstat-3-37 on IBM RS/6000-AIX 3.2.5 

Neither CC=cc or CC=gcc built without error, but CC=bsdcc did. 
( "bsdcc" is not a in the xlc distribution, but the bsdcc profile 
   is listed in the porting hints in infoexplorer xlc docs. ) 
With that it appears to work. Loading tests/test gets one math
error ( which is documented as not abnormal ), and some of the 
Examples ( tourdemo and some others ) work. 


I tried to load and run some of my 2.1R2 code. 

The first incompatability was easy to catch: 
  The changes doc says that packages are now supported. 
  I had "faked" it with a variable name containing a colon. 


One other previously working piece of code still gives me an
error (sometimes): 



( defun multi-plot ( &rest ys &key ( title "multi-plot" ) )
    ( let* (( y ( car ys ))
        ( x ( iseq 1 ( length y )))
        ( colors ( remove 'white ( remove 'black (color-symbols) )))
        ( p ( plot-lines x y :title title :width 2 :color ( car colors )))
        ( junk ( send p :reverse-colors ) )
        ( i 0 ) ( c Nil ))
        ( print p )
        ( dolist ( y ( cdr ys ))
            ( setq i ( + i 1 ))
            ( setq c ( elt colors ( mod i ( length colors ))))
      ( if ( not ( = (length x) (length y)))
         ( setq y ( iseq 1 ( length y ))))
            ( send p :add-lines x y :color c :width 2 ))
        ( send p :adjust-to-data )
        p ))



> ( setq x ( iseq 20 ))

; *ONE* argument doesn't work
> ( multi-plot x )
Error: keyword value missing
Happened in: #<Closure-MULTI-PLOT: #200fe310>

; but *TWO* arguments does work and produces a correct two line plot
> ( multi-plot x x )

#<Object: 537944896, prototype = SCATTERPLOT-PROTO> 
#<Object: 537944896, prototype = SCATTERPLOT-PROTO>

; Three arguments doesn't work...
> ( multi-plot x x x ) 
Error: keyword value missing
Happened in: #<Closure-MULTI-PLOT: #200fe310>

; and this one gives and error message 
; but the window appears with the proper window title "test" 

> ( multi-plot x x :title "test" ) 

#<Object: 538059152, prototype = SCATTERPLOT-PROTO> 
Error: bad argument type - :TITLE
Happened in: #<Subr-LENGTH: #200c7c20>
> 


I note that ( help 'defun ) doesn't list a &key argument in 
either version, but it DID work previously. ( There were a 
few other descrepancies between the doc's and the actual 
behaviour, so I thought that was just another. ) Has it 
been changed so that it no longer supports &key ? (Is there
another way to do keyword args ? ) 


- Steve Majewski       (804-982-0831)      <sdm7g@Virginia.EDU>
- UVA Department of Molecular Physiology and Biol<ogical Physics

