Declaring Strings

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jaynetics
    New Member
    • Nov 2008
    • 1

    Declaring Strings

    Hi everybody,

    My question is whether there is a method of declaring an array whose parameters are the contents of an entire file without copying and pasting? If you can hint at a function or two that can point me in the right direction I would greatly appreciate it.

    Thanks.
  • oler1s
    Recognized Expert Contributor
    • Aug 2007
    • 671

    #2
    My question is whether there is a method of declaring an array whose parameters are the contents of an entire file without copying and pasting?
    Explain what you mean because your technical terminology is a bit wonky.

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      If I read your question correctly, you want to use the disc file irtself as an array.

      That works fine if the disc file is not in binary. You can use seek/tell to move around in the file. This also allows updating the file directly in as random manner.

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by weaknessforcats
        If I read your question correctly, you want to use the disc file irtself as an array.

        That works fine if the disc file is not in binary. You can use seek/tell to move around in the file. This also allows updating the file directly in as random manner.

        Most (if not all) unix systems even have mmap() and munmap() functionality that maps (part of) the file directly to virtual memory. It circumvents a few read/write disk buffers as well. I don't know whether or not MS Windows offers that facility but they're nuts if they don't.

        kind regards,

        Jos

        Comment

        Working...