🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.prolog
Article #75

Re: integer to string in Prolog

#75
From: NIDE Naoyuki
Date: Mon, 30 Mar 1998 00:00
18 lines
828 bytes
In <6fdvl2$lt7@bgtnsc02.worldnet.att.net>
	wongjohn@worldnet.att.net writes:
> Does anybody know how to convert an integer to string in Prolog???  Thanks!

  name/2 will work. 

	| ?- name(123, X).
	X = [49,50,51] ?	/* ="123" */
	yes
	| ?- name(X, "123").
	X = 123 ?
	yes
	| ?- name(X, "abc").
	X = abc ?
	yes

						nide@ics.nara-wu.ac.jp
Technical Details
Message-ID: <6fnh1h$j8s@ns.h.kyoto-u.ac.jp>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6fdvl2$lt7@bgtnsc02.worldnet.att.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1217ff,c92aabd597b992cb
X-Google-Attributes: gid1217ff,public
From: nide@i.h.kyoto-u.ac.jp (NIDE Naoyuki)
Subject: Re: integer to string in Prolog
Date: 1998/03/30
Message-ID: <6fnh1h$j8s@ns.h.kyoto-u.ac.jp>
X-Deja-AN: 339047688
References: <6fdvl2$lt7@bgtnsc02.worldnet.att.net>
Distribution: fj
Organization: Faculty of Integrated Human Studies, Kyoto University, Japan
Newsgroups: fj.lang.prolog