[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: concatenate two string
From: |
Emmanuel Coquery |
Subject: |
Re: concatenate two string |
Date: |
Thu, 28 Mar 2002 09:29:09 +0100 |
Le Mercredi 27 Mars 2002 12:22, Gurvan Le Guernic a écrit :
> Hi,
> I am looking for a way to concatenate 2 string; but I can't find how.
> For example, I have : X='Hello, '
> Y = 'world'
> I would like to have : Z = 'Hello, world'
> How can I do?
> Gurvan
>
>
> _______________________________________________
> Users-prolog mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/users-prolog
If you want to concatenate atoms like X='Hello, ' and Y='world'
use
atom_concat(X,Y,Z)
If it's strings (with double quotes " instead of ') like X="Hello, " and
Y="world"
use
append(X,Y,Z)
since string are lists of integers
--
--
Emmanuel Coquery
**********************************
e-mail: address@hidden
**********************************
Adresse / Postal address:
Emmanuel Coquery
Bâtiment 8, Bureau 809,
INRIA Rocquencourt
BP 105
78153 Le Chesnay Cedex
FRANCE
tel. (+33) 1 39 63 51 91