Solved

Random and Binary mode

Posted on 1998-06-18
2
270 Views
Last Modified: 2010-05-03
What is the essencial diference between Random mode and Bynary mode when i create a file.?
When is the best to use one or the other?
 Regards.

Francisco
0
Comment
Question by:flafee
[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
2 Comments
 
LVL 1

Accepted Solution

by:
redbaron082997 earned 70 total points
ID: 1463658
Random is either read or write. Binary mode allows you to read a file determining the number of bytes read, not the number of characters.
For files opened in Binary mode, all of the Random rules apply, except:

·      The Len clause in the Open statement has no effect. Put writes all variables to disk contiguously; that is, with no padding between records.
·      For any array other than an array in a user-defined type, Put writes only the data. No descriptor is written.
·      Put writes variable-length strings that are not elements of user-defined types without the 2-byte length descriptor. The number of bytes written equals the number of characters in the string. For example, the following statements write 10 bytes to file number 1:

VarString$ = String$(10," ")
Put #1,,VarString$
0
 

Author Comment

by:flafee
ID: 1463659
Thank you, your answer is very helpful !

0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month10 days, 15 hours left to enroll

628 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