CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Aug 2014

    Random access file variable length

    I'm creating a random access file. When counting the different variables to get the length of the file, how much should I enter for a date variable?

    For example

    type guest
    name as string * 20
    address as string * 30
    arrivaldate as date
    end type
    dim g as guest

    The name and address is simple but how much should I reserve for the date variable?

  2. #2
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008

    Re: Random access file variable length

    You are using a Type so you can simply get the length of the type

    Open Filename for Random as #1 len=Len(g)
    a date data type is 8 bytes if I'm not mistaken
    Always use [code][/code] tags when posting code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.