Solved

Instead of EOF!

Posted on 2000-04-09
12
341 Views
Last Modified: 2008-03-10
Is there an other way to test the end of a file? Is EOF only for ASCII files? I know in C there's an "feof" can test the end of a binary file, what's VB's?
0
Comment
Question by:prefix
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
  • +2
12 Comments
 
LVL 1

Expert Comment

by:guyss
ID: 2697650
there is an EOF(file-number) function.
0
 
LVL 2

Expert Comment

by:danlevans
ID: 2697653
EOF(1) True means end of data has been reached in ascii or binary files.
0
 
LVL 14

Expert Comment

by:wsh2
ID: 2697660
Or.. after opening the file.. you can test the for the length of the file by using the LOF(file number) filenumber. While processing the file you can use the Seek(file number) function to either read the current file position (when used on the right side of an equation)..or to set it to another place (when used on the left side of an equation).

0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
LVL 1

Author Comment

by:prefix
ID: 2700041
Hello:
  Is EOF(#filenumber) also be able to test a binary file?
0
 
LVL 1

Author Comment

by:prefix
ID: 2700049
And run commonly?
0
 
LVL 1

Accepted Solution

by:
guyss earned 5 total points
ID: 2700061
yes it can.
0
 
LVL 1

Author Comment

by:prefix
ID: 2700267
Thanks you.
0
 
LVL 1

Expert Comment

by:guyss
ID: 2700307
sure,
you could have awarded some points though...
0
 
LVL 14

Expert Comment

by:wsh2
ID: 2701024
Guyss:
Zero points and a "C" grade?.. You really have been had.. LOL.

I agree, a modicum of points would have been nice. Post a question in Customer Service.. to bring their attention to this question.. <smile>.

http://www.experts-exchange.com/Customer_Service/Experts_Exchange/

0
 
LVL 3

Expert Comment

by:darinw
ID: 2706630
Hello all,

Well.. I'd like to remind the Experts that the grading history is available for everyone.

Last 5 Grade(s) Given:  
C B B C A  

....And remind prefix that you should try to be fair when you grade your questions. The Experts are here helping  YOU. Don't make it hard to get help by not being fair with grades or posting very low point or zero point questions.

darinw
Customer Service
0
 
LVL 1

Author Comment

by:prefix
ID: 2707585
EveryOne:
  This question is my first and the lowest point I posted. I havn't post such questions like this before and didn't know the points will be so few. Hope you won't mind.
0
 
LVL 1

Expert Comment

by:guyss
ID: 2707610
no matter, it isn't very important.
i like answering questions...
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question