From: Doug Edwards
Subject: School Help
Date: 
Message-ID: <4rtl6p$cpm@fnord.dfw.net>
I'm working on a school project that includes LISP code examples.  I've 
found many examples in library books, but still need something.

Could someone send me a source code listing of a simple lisp database 
program that I could adapt.  The record structures would be similar to 
an address book.  I must have Name, address, age (integer) and ten 
float numbers (for grades).  I must enable the user to save to file, 
retrieve and update the records.  I must also sort them.  

Any help would be appreciated.

Thank you,

Doug Edwards

From: Bruce Voss
Subject: List  -->  String????
Date: 
Message-ID: <31E3DD31.3BAE@nortel.ca>
I am trying to convert a complex list (list of lists) into a string. The list looks something like this: 
	
		((2 3) (3 4) (4 5)) 

I want it to look like this: 
		
		"((2 3) (3 4) (4 5))" 

Does anyone know how this can be done with relative ease?

Any help would be appreciated.

Regards,

·····@engsoc.carleton.ca

········@nortel.ca

..all opinions are my own, etc. etc.
From: Benjamin Shults
Subject: Re: List  -->  String????
Date: 
Message-ID: <31E4037D.42A08CFD@math.utexas.edu>
Bruce Voss wrote:
> 
> I am trying to convert a complex list (list of lists) into a string. The list looks something like this:
> 
>                 ((2 3) (3 4) (4 5))
> 
> I want it to look like this:
> 
>                 "((2 3) (3 4) (4 5))"
> 
> Does anyone know how this can be done with relative ease?
> 

(format nil "~a" '((2 3) (3 4) (4 5)))
=> 
"((2 3) (3 4) (4 5))"

(stringp (format nil "~a" '((2 3) (3 4) (4 5))))
=>
T

(format nil "~s" '((2 3) (3 4) (4 5)))
=> 
"((2 3) (3 4) (4 5))"

(stringp (format nil "~s" '((2 3) (3 4) (4 5))))
=>
T


-- 
Benjamin Shults                 Email:  ·······@math.utexas.edu
Department of Mathematics       Phone:  (512) 471-7711 ext. 208
University of Texas at Austin   WWW:    http://www.ma.utexas.edu/users/bshults
Austin, TX  78712   USA         FAX:    (512) 471-9038 (attn: Benjamin Shults)
From: Erik Naggum
Subject: Re: List  -->  String????
Date: 
Message-ID: <3046039311791409@arcana.naggum.no>
[Bruce Voss]

|   I am trying to convert a complex list (list of lists) into a string.
|   The list looks something like this:
|   	
|   		((2 3) (3 4) (4 5)) 
|   
|   I want it to look like this: 
|   		
|   		"((2 3) (3 4) (4 5))" 
|   
|   Does anyone know how this can be done with relative ease?

see the section of the Lisp printer in your Lisp reference.

#\Erik
From: Ken Tilton
Subject: Re: List  -->  String????
Date: 
Message-ID: <31EBDB4E.4C47@bway.net>
Bruce Voss wrote:
> 
> I am trying to convert a complex list (list of lists) into a string. The list looks something like this:
> 
>                 ((2 3) (3 4) (4 5))
> 
> I want it to look like this:
> 
>                 "((2 3) (3 4) (4 5))"
> 
> Does anyone know how this can be done with relative ease?
> 
> Any help would be appreciated.
> 
> Regards,
> 
> ·····@engsoc.carleton.ca
> 
> ········@nortel.ca
> 
> ..all opinions are my own, etc. etc.

Hmmm. How about (format t "~s" (format nil "~s" '((2 3) (4 5))))?

Not sure what happens when you get away from simple atoms like 2 and 3.

Cheers,

Ken
From: Brian M. Moore
Subject: Re: List  -->  String????
Date: 
Message-ID: <mooreb-1807961615020001@emu.cc.ukans.edu>
In article <·············@bway.net>, ····@qi-labs.com wrote:

> Bruce Voss wrote:
> > 
> > I am trying to convert a complex list (list of lists) into a string.
The list looks something like this:
> > 
> >                 ((2 3) (3 4) (4 5))
> > 
> > I want it to look like this:
> > 
> >                 "((2 3) (3 4) (4 5))"
> > 
> > Does anyone know how this can be done with relative ease?
> > 
> > Any help would be appreciated.
> > 
> > Regards,
> > 
> > ·····@engsoc.carleton.ca

(setq my-string (format nil "~A" '((2 3) (3 4) (4 5))))