the title it's self explanatory
i am using freepascal with the Lazarus IDE and this is quite a challenge for a noob like me
so please the code with some explanation
thusarix 0 Newbie Poster
Recommended Answers
Jump to Posthttp://www.freepascal.org/docs-html/rtl/system/assign.html
Try the examples at the bottom and go from there. If you still have questions, come back here with a specific example/problem.
Jump to Postlet's see... :D
(*your source code interpretered...by me*) program text_files; var f,(*in.txt*) g:text;(*out.txt*) x:string; (*one string...*) begin (*in.txt's path assigned to f var*) assign(f, 'd:\pascal\dosare\in.txt'); (*out.txt's path assigned to g var*) assign(g,'d:\pascal\dosare\out.txt'); (*x's value is be that string..?,why?,if you don't use it?*) x:='d:\pascal\dosare\in.txt'; reset(f); (*open for reading …
Jump to Posti don't know what u r trying to show me.....if this work's for me, i want to copy the entire content of the file not just one line, and i must move my folders where i want
You can store your file where you want to.
If you want to …
Jump to Post{look at that...we're conditioning that in.txt isn't empty...} program text_files_version0002; var f,(*in.txt*) g:text;(*out.txt*) x,y:string; (*two string to store the paths of the two files.*) temp:string;(*to read/write the lines of the specified file(s)*) begin (*x will store the in.txt's path.*) x:='d:\pascal\dosare\in.txt'; (*and y'll store the out.txt's path.*) y:='d:\pascal\dosare\out.txt'; …
All 13 Replies
pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster
thusarix 0 Newbie Poster
FlamingClaw 98 Posting Pro
thusarix 0 Newbie Poster
FlamingClaw 98 Posting Pro
thusarix 0 Newbie Poster
FlamingClaw 98 Posting Pro
belthazor 0 Newbie Poster
Jaxneo 0 Newbie Poster
Wolfgan 17 Junior Poster
belthazor 0 Newbie Poster
mahmoud85 0 Newbie Poster
dhee.outsider 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.