Vitor Reis Posted March 23, 2004 Report Share Posted March 23, 2004 pessoal preciso criar um arquivo txt sem caracter de fim de pagina. usando o fcreate() fwrite() fopen dá certo, porem nao consegui passar pra linha de baixo.... tudo que mando para arq.txt fica na mesma linha... olhe o que fiz... #include "Fileio.ch" IF (nHandle := FCREATE("teste.txt", FC_NORMAL)) = -1 FERROR() BREAK ELSE FWRITE(nHandle, "Linha 1") FWRITE(nHandle, "Linha 2") FCLOSE(nHandle) ENDIF onde eu estou errando??? Quote Link to comment Share on other sites More sharing options...
evandro Posted March 23, 2004 Report Share Posted March 23, 2004 Olá, Faltou incluir o controle de fim de linha: chr(13)+chr(10). Ficaria assim: #include "Fileio.ch" #define CR_LF Chr(13) + Chr(10) IF (nHandle := FCREATE("teste.txt", FC_NORMAL)) = -1 FERROR() BREAK ELSE FWRITE(nHandle, "Linha 1"+CR_LF) FWRITE(nHandle, "Linha 2"+CR_LF) FCLOSE(nHandle) ENDIF []s, Evandro G. de Paula Curvelo - MG evandro@skillnet.com.br (Escr. - na Cidade) imortal@skillnet.com.br (Res. - na Roça) Quote Link to comment Share on other sites More sharing options...
Vitor Reis Posted March 23, 2004 Author Report Share Posted March 23, 2004 valeo evandro Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.