Solved

Random and Binary mode

Posted on 1998-06-18
2
245 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
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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Hide vba in gp 7 95
Passing a Text Box name to a Sub 6 96
Problem to With line 4 57
fso.FolderExists("\\server\HiddenFolder$") 4 68
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

823 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