File writting

Description

Procedure which save data to a file „towary”

Source: PROLOG str. 81 Wydawnictwo PLJ Warszawa 1991 ISBN 83-85190-63-5

Download

Program source code: file_writting.pl

Listing

wyrob(towar1, 10, 10).
wyrob(towar2, 50, 220).
wyrob(towar3, 120, 500).
wyrob(towar4, 110, 80).
 
write_plik :- tell(towary), do_write, told.
 
do_write :- wyrob(Nazwa, Kod, Cena), write([Nazwa, Kod, Cena]), write(.), nl, fail.

Comments

pl/prolog/pllib/file_writting.txt · ostatnio zmienione: 2019/06/27 15:50 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0