freepascal:varf:textfile;beginassign(f,'input.txt');rewrite(f);writeln(f,'hello world!');close(f);//记得都要加"f"end.