Subject: RE: [SWIPL] Converting terms to strings

From: Kourakos-Mavromichalis Evagelos <[email-masked]>
Date: Sat, 7 Apr 2001 10:45:14 +0300

The name(?AtomOrInt, ?String) takes as input atoms or integers and returns
ASCII lists. I need a predicate that takes as input terms (that contains
strings as arguments) and returns ASCII lists.

> -----Original Message-----
> From: Jacinto A. Davila [mailto:[email-masked]]
> Sent: Saturday, April 07, 2001 12:45 AM
> To: Kourakos-Mavromichalis Evagelos
> Subject: Re: [SWIPL] Converting terms to strings
> 
> 
> 
> Try name(red, ListofAscii).
> 
> Jacinto A. Dávila (http://cesimo.ing.ula.ve/~jacinto/)
> Coordinador del Postgrado en Modelado y Simulación (cesimo.ing.ula.ve)
> Coordinador del Laboratorio de Computación Avanzada, Multimedia y
> Video-Conferencia (pgvirtual.pg.ing.ula.ve/labcamv/). 
> Universidad de Los Andes (www.ula.ve) 
> 
> On Fri, 6 Apr 2001, Kourakos-Mavromichalis Evagelos wrote:
> 
> > Hello,
> > I'd like to know if it's possible to convert a term like:
> > box(red,'is red')
> > to a list:
> > [ A1, A2,..., A17 ]
> > where Ax are the ASCII values of chars of the term.
> > 
> > I think that the only build in predicate that achieves this is the 
> > string_to_list( ?String, ?List ). 
> > but how we convert the box(red,'is red') to a string?
> > 
> > Also, is it possible to write such terms that contains 
> strings to text
> > files?
> > 
> > Thanks in advance,
> > Vangelis Mavromichalis
> > PhD Student
> > 
> > 
> > ----------------
> > * To UNSUBSCRIBE, please use the HTML form at
> > 
> >     
> http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist
> > 
> > or send mail to [email-masked] using the 
> Subject: "unsubscribe"
> > (without the quotes) and *no* message body.
> > 
> > ** An ARCHIVE of this list is maintained at
> > 
> >     
> http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/
> > 
>