Announcement

Collapse
No announcement yet.

Error 599

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

  • Mel Bishop
    replied
    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.


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

    Leave a comment:


  • Guest's Avatar
    Guest replied
    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).]

    Leave a comment:


  • Mel Bishop
    replied
    Well, it looks like I just found a reason to upgrade.
    Thanks Lance
    Cheers


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

    Leave a comment:


  • Lance Edmonds
    replied
    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>

    Leave a comment:


  • Mel Bishop
    started a topic Error 599

    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.



    ------------------
Working...
X