Announcement

Collapse
No announcement yet.

LINE INPUT# Limit?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • LINE INPUT# Limit?

    Is there a line length limitation for LINE INPUT#? If so; What is it?

  • #2
    Yes there is.. or at least was (thru 4x) a limit. You could get this error by tring to LINE INPUT a record from a sequential file with Unix record termination (0x0A LF only; vs PC's 0x0D0A CRLF). It the file was "too big" LINE INPUT simply never returned.

    However, your problem may not be that. If program is GPF'ing it could be because you are trying to create a local scalar > stack size to use as the file buffer, as in ..
    Code:
      LOCAL szBuff AS ASCIIZ * (number) 
     ...
      ...  LINE INPUT #hFile, szBuff
    Change to string (not ASCIIZ) buffer to solve this.

    Code not shown. Problem not described. Solution only guessed.

    MCM
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Or you can use this...Memory-Mapped File Version of LINE INPUT

      That's unix/PC agostic and uses dynamic strings.
      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #4
        Thanks Michael!

        The 4K limit is more than enough for my needs. I thought it might be 256 or 512 bytes which would have been a problem. My current project is a computer directed test program that uses a script to guide the test tech through the test procedure. Embedded in the script are strings of commands that control a test generator and the device under test. Some of the command strings are quite lengthy and I was concerned that some of them might exceed the allowed character limit.

        Again Many Thanks!

        Comment


        • #5
          >The 4K limit ...

          From whence cometh that number?

          I had to get nix-delimited files 2, 3, more Mb before it failed.

          Sent it in to support and the best they could do was tell me "Don't do that." (One reason that demo exists. I had to write something which could, "do that" with large files).
          Michael Mattias
          Tal Systems (retired)
          Port Washington WI USA
          [email protected]
          http://www.talsystems.com

          Comment


          • #6
            Sorry Michael I miss read your original response.

            The likelyhood of any of the command strings I'm using approaching 2 or 3 MB is 0. Long command strings that are used frequently will be bundled into macros.

            Comment


            • #7
              The likelyhood of any of the command strings I'm using approaching 2 or 3 MB is 0. Long command strings
              Command strings?

              Now I'm the one who must have misread something. I thought you were asking about record length in the LINE INPUT# statement.

              Michael Mattias
              Tal Systems (retired)
              Port Washington WI USA
              [email protected]
              http://www.talsystems.com

              Comment

              Working...
              X