Subject: Re: string reverse
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 8 Jun 2001 09:09:20 GMT
Newsgroups: comp.lang.lisp
Message-ID: <9fq4o0$f1cou$1@fido.engr.sgi.com>
Jeroen Valcke  <jeroen@valcke.com> wrote:
+---------------
| Bulent Murtezaoglu wrote:
| > It does not work (try it).
| 
| On my system it seems to work fine ???
| In clisp on linux, this is what I get. Seems fine to me.
| 
| [1]>
| (defun reverse_str (string)
| (reverse string))
| REVERSE_STR
| [2]> (reverse_str '(this is a test))
| (TEST A IS THIS)
| [3]>
+---------------

Uh... Dude, you didn't give it a STRING, you gave it a list of SYMBOLS.
Of *course* it worked!!  Now try it with a *STRING*:

	> (reverse_str "this is a test")
	"tset a si siht"
	>


-Rob

-----
Rob Warnock, 31-2-510		<rpw3@sgi.com>
SGI Network Engineering		<http://reality.sgi.com/rpw3/> [until 8/15]
1600 Amphitheatre Pkwy.		Phone: 650-933-1673
Mountain View, CA  94043	PP-ASEL-IA

[Note: aaanalyst@sgi.com and zedwatch@sgi.com aren't for humans ]