From: ···@mod.dsto.gov.au
Subject: FFI (strings & lists)
Date: 
Message-ID: <290e8q$ivv@fang.dsto.gov.au>
Hi,

I'm having a problem with using the foreign function interface (Lucid Lisp 4.1).  What I want to be able to do is call a c function that should return a command to be executed in lisp.  The c function is currently returning a string (can it return a list??) which I then want to evaluate using eval, but can't since its a string.  

So is there any other way of doing this, such as what is returned can then be 
executed or can I alter the string into a list somehow??

Thanks for any help.

Dave

   
--------------------------------------------------------------
David Perkovic
···@mod.dsto.gov.au    <- prefered
········@cleese.apana.org.au
From: Lambert Wixson
Subject: Re: FFI (strings & lists)
Date: 
Message-ID: <WIXSON.93Oct7153416@zebra.cs.rochester.edu>
In article <··········@fang.dsto.gov.au> ···@mod.dsto.gov.au writes:

> ... can I alter the string into a list somehow??

Here is a function that will convert a string to a list:

(defun string-to-list (str)
  (read-from-string (concatenate 'string "(" str ")")))

				-- Lambert