28.04.2013 Views

3.3 Teoria de la demostració - La Salle

3.3 Teoria de la demostració - La Salle

3.3 Teoria de la demostració - La Salle

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Predicats per manipu<strong>la</strong>ció <strong>de</strong> fitxers<br />

A més a més <strong>de</strong>ls predicats per escriure, llegir, obrir i tancar fitxers, disposem d’un<br />

conjunt <strong>de</strong> predicats pre<strong>de</strong>finits per fer diferents operacions sobre fitxers. Algunes són:<br />

renamefile<br />

copyfile<br />

<strong>de</strong>letefile<br />

existfile<br />

eof<br />

RESUM<br />

El dispositiu estàndard <strong>de</strong> lectura és el tec<strong>la</strong>t (stdin) i el d’escriptura <strong>la</strong> pantal<strong>la</strong> (stdout).<br />

Prolog proporciona un conjunt <strong>de</strong> predicats per llegir valors <strong>de</strong> dominis simples i <strong>de</strong><br />

dominis compostos: readln, readint, readreal, readchar i readterm.<br />

Prolog proporciona un conjunt <strong>de</strong> predicats per escriure: write i writef.<br />

Prolog també permet manipu<strong>la</strong>r fitxers en disc mitjançant un conjunt <strong>de</strong> predicats.<br />

128

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!