|
-
Jun 30th, 2000, 10:57 AM
#1
Thread Starter
Lively Member
How does one insert an EOF marker in a text file?
My VB program creates a text file that a third party app reads. Unless I open it up in notepad and save it, the third party app gives incorrect results. Could it be the EOF marker?
-
Jun 30th, 2000, 11:08 AM
#2
_______
//
as I'm told EOF markers are NOT really used
touched on it briefly years ago
add a record with a unique existance
ie>
Record = XXENDXX
then use an if statement in your code
if record = XXENDXX then do whatever
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 30th, 2000, 11:13 AM
#3
_______
you could try this
'count files in a directory
public iFiles As Integer
Dim sDir As String
'set your own specs for file pattern
sDir = Dir("C:\*.*", vbNormal + vbHidden + vbArchive + vbReadOnly + vbSystem)
While sDir <> ""
iFiles = iFiles + 1
sDir = Dir
Wend
'when you use the file use a loop
do while myVar <> iFiles
'bla bla
loop
when you reach the count you stop processing
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 30th, 2000, 05:34 PM
#4
transcendental analytic
EOF "End Of File" IS what returns if a opened filenumber location (loc) is higher that (lof) length of file. That happens usually when you use input# and past the end of file and get that error.
You cannot put a EOF marker, it's a VB function.
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.
-
Jun 30th, 2000, 06:51 PM
#5
Fanatic Member
The End of a text file is represented by ascii character #26. Just check the QBasic help file. If you have a do until EOF and the loop comes across this character it sees it as the end of the file and stops.
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
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
|