Z zhao0707 Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-23 #1 在导出文本文件的时候,直接write(“/n")不能输出回车换行,输出问黑色小方块 ,但同样的程序,只要把扩展名改为.xml,则能正确输出回车换行,怎么回事
Y ysai Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-23 #2 用writeln var s : string; begin Write('Enter a line of text: '); Readln(s); Writeln('You typed: ',s); Writeln('Hit <Enter> to exit'); Readln; end; 题目搞错了,不好意思
用writeln var s : string; begin Write('Enter a line of text: '); Readln(s); Writeln('You typed: ',s); Writeln('Hit <Enter> to exit'); Readln; end; 题目搞错了,不好意思
S simon707 Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-23 #3 var f:textfile; begin assignfile(f,'c:/test.txt'); rewrite(f); writeln(f,'第1行'); writeln(f,'第2行'); writeln(f,'第3行'); closefile(f); end;
var f:textfile; begin assignfile(f,'c:/test.txt'); rewrite(f); writeln(f,'第1行'); writeln(f,'第2行'); writeln(f,'第3行'); closefile(f); end;
R resun Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-23 #4 回车换行用字符#13#10也可以吧,不过,有什么必要吗???
S snjat Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-24 #6 直接write(“/n")不能输出回车换行//不要用这个 用这个肯定行 BufferedWriter bwerror=new BufferedWriter(new FileWriter("c://import//log//errorlog.txt")); bwerror.newLine();
直接write(“/n")不能输出回车换行//不要用这个 用这个肯定行 BufferedWriter bwerror=new BufferedWriter(new FileWriter("c://import//log//errorlog.txt")); bwerror.newLine();
L l213 Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-24 #7 应该输入#13#10两上字符,而且这两上字符的顺序不能输错,你换着位置试一下。我原来试过的,现在忘了。
A alextsui Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-24 #8 用Writeln或者Write(#13)就可以實現換行了.