Announcement

Collapse

New Sub-Forum

In an effort to help make sure there are appropriate categories for topics of discussion that are happening, there is now a sub-forum for databases and database programming under Special Interest groups. Please direct questions, etc., about this topic to that sub-forum moving forward. Thank you.
See more
See less

Error 599

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

  • Error 599

    I was in the process of "cleaning up" some of my programs and
    ran across somewhat of a head-scratcher. I am using PB 2.1f for
    DOS.

    If I use the following procedure, I get an
    "Error 599: Parameter arrays may not be altered", which isn't in
    the book that I have.
    It errors out on the REDIM statement.

    sub make.set(a&&,b$(),c,d)
    redim b$(c)
    ...
    ...
    end sub

    On the other hand, if I go this route:

    sub make.set(a&&,c,d)
    shared b$()
    redim b$(c)
    ...
    ...
    end sub

    It compiles and runs as advertised. Anybody know the why's and
    what-for's of whats happening 'cause I sure don't? Thanks.



    ------------------
    There are no atheists in a fox hole or the morning of a math test.
    If my flag offends you, I'll help you pack.

  • #2
    PB2.x and FirstBasic do not allow arrays to be redimmed from subs/functions if the array was passed as a parameter. It seems that the error was omitted from the documentation, as I confirmed with my PB2.10f manual set.

    However, PB3.5 does allow passed arrays to be redimmed, provided the arrays are not STATIC (STATIC is the default array type).

    Using SHARED arrays works with all versions of PB/DOS and FirstBASIC.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      Well, it looks like I just found a reason to upgrade.
      Thanks Lance
      Cheers


      ------------------
      There are no atheists in a fox hole or the morning of a math test.
      If my flag offends you, I'll help you pack.

      Comment


      • #4
        Mel,

        Look at REDIM vs DIM with PASSED ARGUMENTS. I had the same problem
        and received excellent help from Lance Edmonds.

        Pat Bruening

        ------------------


        [This message has been edited by Pat Bruening (edited January 16, 2001).]

        Comment


        • #5
          Hi Pat.
          Thanks for the tip. I have tried every possible combination
          but my poor little PB 2.1f just won't cut it. " The example
          that I gave above is my final (out of several) attempt(s) to
          get around this. If you were to take every DIM and REDIM in
          it and juggle it around, I tried it.


          ------------------
          There are no atheists in a fox hole or the morning of a math test.
          If my flag offends you, I'll help you pack.

          Comment

          Working...
          X