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
Solved

Random and Binary mode

Posted on 1998-06-18
2
251 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

Suggested Solutions

Title # Comments Views Activity
Excel object stays open 19 78
VBA filters 2 64
Need Nag Screen for Reboot if system up time is over 14 days 12 60
VBA to find and replace multiline text from VBA modules 8 63
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

792 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