|
-
Feb 26th, 2007, 03:12 AM
#1
Thread Starter
Lively Member
[RESOLVED] print a sentence to txt file
<?xml-stylesheet type="text/xsl" href="xsl_log file.xsl"?>
i want to put above sentence in a 1st line of text file.....
how to write the code?
open "C:\aa.txt" for append as #1
print #1,"<sentence put here>"
close #1
-
Feb 26th, 2007, 03:16 AM
#2
Re: print a sentence to txt file
Write this.
Print #1, "<?xml-stylesheet type=""Text / xsl"" href=""xsl_log file.xsl""?>"
-
Feb 26th, 2007, 12:37 PM
#3
Re: [RESOLVED] print a sentence to txt file
Open for Output. Open for Append opens an exosting file and puts what you print at the bottom.
If you want to print something to the first line of an existing file, you'll have to read the entire file, add the new sentence at the beginning, and priont the whole thing to the file. You can't insert text in an existing text file.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|