🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: gmane.comp.ai.prolog.swi
1 messages
1 total messages Started by Lionel Ains Fri, 19 Apr 2002 13:23
Re: witre in file
#34
Author: Lionel Ains
Date: Fri, 19 Apr 2002 13:23
77 lines
1766 bytes
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--=_NextPart_Caramail_0067721019211831_ID
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

If what you try is to write to a text file, here are some
lines to do so (note that $Stream actually contains the last
value bound to Stream):

?- open('test_file', append, Stream).

Stream = '$stream'(1148628)

Yes
?- write($Stream, 'One line').

Yes
?- close($Stream).

Yes
?- ls.
test_file

Yes


This can also be done using the following goal:
?- open('test_file', append, Stream), write(Stream, 'One
line'), close(Stream).

More info is in the manual section 4.16

Lionel

> -------Message d'origine-------
> De : lamis hawarah <lhawarah@yahoo.fr>
> Date : 19/04/2002 10:24:36
>
> Hello
>
> someone can help me : I am inexperienced in prolog
> I try to write in File, but I can't do that
> Thank you
> Lamis
>
> ___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en
français !
> Yahoo! Mail : http://fr.mail.yahoo.com
>
>
> ----------------
> * To UNSUBSCRIBE, please use the HTML form at
>
>
http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist
>
> or send mail to prolog-request@swi.psy.uva.nl 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/
>
>
>
______________________________________________________
Personnalise ton répondeur au 08 99 703 970 (*)
(*) 1,35 Euro/appel + 0,34 Euro/mn


--=_NextPart_Caramail_0067721019211831_ID--

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads