<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/1.0.1">
</HEAD>
<BODY>
This is the code.
<BR>
<BR>
Assign(arq_s,'matriculas.arq');
<BR>
if (not FileExists('matriculas.arq')) then
<BR>
Rewrite(arq_s)
<BR>
else
<BR>
Append(arq_s);
<BR>
write(arq_s,reg_matricula);
<BR>
Close(arq_s);
<BR>
<BR>
Which unit is FileExists() in? Do I have to add some unit to have it working?
<BR>
<BR>
Edvaldo Almeida
<BR>
<A HREF="mailto:edvaldo@bookinformatica.com.br">edvaldo@bookinformatica.com.br</A>
<BR>
<A HREF="mailto:edvaldolalmeida@yahoo.com">edvaldolalmeida@yahoo.com</A>
<BR>
<BR>
<BR>
<BR>
Em Seg, 2004-01-05 às 10:14, Peter Vreman escreveu:
<BLOCKQUOTE>
<PRE><FONT COLOR="#fe1431"><FONT SIZE="3"><I>> I've been trying to use the function file() to detect if a certain file</FONT></FONT></I>
<FONT COLOR="#fe1431"><FONT SIZE="3"><I>> is in the current path, but i've been receiving an error message.</FONT></FONT></I>
<FONT COLOR="#fe1431"><FONT SIZE="3"><I>></FONT></FONT></I>
<FONT COLOR="#fe1431"><FONT SIZE="3"><I>> What is the correct funtion? I've already used fileexists(), but it's</FONT></FONT></I>
<FONT COLOR="#fe1431"><FONT SIZE="3"><I>> not correct also.</FONT></FONT></I>
<FONT COLOR="#fe1431"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#fe1431"><FONT SIZE="3"><I>Please post the code you used. FileExists() does not print an error message.</FONT></FONT></I>
<FONT COLOR="#fe1431"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#fe1431"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#fe1431"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#fe1431"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#fe1431"><FONT SIZE="3"><I>_______________________________________________</FONT></FONT></I>
<FONT COLOR="#fe1431"><FONT SIZE="3"><I>fpc-pascal maillist - fpc-pascal@lists.freepascal.org</FONT></FONT></I>
<FONT COLOR="#fe1431"><FONT SIZE="3"><I>http://lists.freepascal.org/mailman/listinfo/fpc-pascal</FONT></FONT></I>
<FONT COLOR="#fe1431"><FONT SIZE="3"><I></FONT></FONT></I>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>