Solved

Random and Binary mode

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

713 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