|
-
Oct 30th, 2000, 08:10 PM
#1
Thread Starter
Lively Member
How do you open a text file, add lines/stuff to it, and save it?
___________________________
Chris
-
Oct 30th, 2000, 08:13 PM
#2
Append to a file.
Code:
Open "C:\MyTextFile.txt" For Append As #1
Print #1, "My added text"
Close #1
This will add text to the end of a file.
-
Oct 30th, 2000, 08:14 PM
#3
Fanatic Member
Code:
Open FileName For Action {Append, Input, Output, Binary, Random} As FileNum (Use FreeFile Function)
'For Text File, ex.
Dim FileNum As Integer
FileNum = FreeFile
Open "C:\MyFile.txt" For Append As #FileNum
Print #FileNum, "This is some Sample Text"
Close FileNum
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
-
Oct 30th, 2000, 08:28 PM
#4
transcendental analytic
You could read my file tutorial on my homepage, it covers the most basic things about files
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
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
|