Announcement

Collapse
No announcement yet.

Program line length question

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

  • Program line length question

    I've hit an issue where I need to scan a string of about 220 characters in length using ASCI characters at each step in the scan to use the character # for the character for pointer and value work further in the program. The current string length for this technique is about 118 bytes in length.

    I've never used a string this long on a given line in a PB 3.5 program before. For programming visual checking work in creating the ASCI characters that need to be used, it would be a lot better visually to be able to see portions of that string all within the 80 character normal screen width. romping rightward to rightward to just see what is at any given point in the source code is already interesting at this point where the program initially wasn't near this long but has grown and is to grow again now it seems.

    I've never considered the 'wrap' line use as a technique to 'wrap' a sequence of letters on successive lines in the source code into one longer string. Does this work?

    Sure .. I could create it by successive techniques of, say, DMY$ = "ABADF", then DMY$ = DMY$ + "GGGHS". But again, is there a practical limit for then hitting a point in the string from an INSTR technique to get whatever block of the desired four characters I need for each chunk of that 200+ byte long data string? If so, what is the design limit for such things in PB 3.5?

    Yes, there are other programming techniques which could be used to do this, such as an array of fixed length characters for each four character block. Then just index the request to whatever element of the array might be needed.

    But I'm just wondering what the generic issues are for just expanding the way the whole thing was created a long time ago when the world was less complicated for the number of items needed in the operation!

    Thanks!
    Mike Luther
    [email protected]

  • #2
    Your problem is seeing the long string on the editor screen without scrolling?

    Just concatenate ..
    Code:
       s =        "XXXXXXXXXXXXXXXXXXXXXXXX" 
       s =  s  & "YYYYYYYYYYYYYYYYYYYYYYYY"
       s =  s  & "ZZZZZZZZZZZZZZZZZZZZZZZZ"
    For all can remember re PB/DOs, you may be able to use the underscore continuation character (I know you can do this with the WIndows compilers):

    Code:
       s =        "XXXXXXXXXXXXXXXXXXXXXXXX"  _
                &  "YYYYYYYYYYYYYYYYYYYYYYYY" _ 
                &  "ZZZZZZZZZZZZZZZZZZZZZZZZ"
    ???

    I must be missing something or misinterpreting your question
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Mike:

      As far as I remember the limit is 128 character for the whole command line.

      Comment


      • #4
        Mike:

        Maybe you can use multiple DATA statements for the same purpose, and then read it with a FOR / NEXT loop?
        Regards,
        Manuel

        Comment


        • #5
          Thanks Manuel ..

          That 128 byte figure was what I thought I remembered. That in mind I'll not try to experiment with this but chunk this into pieces one way or another..

          I appreciate your thought. Looked through the books for the quick answer but missed it or whatever.

          Have a wonderful time at whatever you do next!
          Mike Luther
          [email protected]

          Comment

          Working...
          X