+ Reply to Thread
Results 1 to 9 of 9

Thread: Dynamic Arrays Revisited

  1. #1

    Default Dynamic Arrays Revisited

    ** This thread discusses the article: Dynamic Arrays Revisited **
    This is a discussion about Dynamic Arrays Revisited.

    Click here for the article.


  2. #2
    Guest.Visitor Guest

    Default Dynamic Arrays Revisited

    ** This thread discusses the article: Dynamic Arrays Revisited **
    Bob, Using this method, what will happen as I shrink the array? Does the user space de-allocate memory as requirements are reduced? Thanks.

  3. #3
    Guest.Visitor Guest

    Default Dynamic Arrays Revisited

    ** This thread discusses the article: Dynamic Arrays Revisited **
    As user space gets extended, is there a finite limit as to how far OS will auto-extend it?

  4. #4

    Default Dynamic Arrays Revisited

    ** This thread discusses the article: Dynamic Arrays Revisited **
    No, once a user space is extended is the permanantly resized. You can delete and recreate the user space each time you run your program, or simply reduce its size and call your program.

  5. #5

    Default Dynamic Arrays Revisited

    ** This thread discusses the article: Dynamic Arrays Revisited **
    The maximum size of the user space is 16 megabytes. This was an old (pre-64-bit OS/400) "feature". It did not change when they re-did much of OS/400 in 64-bit.

  6. #6

    Default Dynamic Arrays Revisited

    ** This thread discusses the article: Dynamic Arrays Revisited **
    Thanks for the tip I compiled & ran the program, element 1700 displayed "Hello World!" just as the article says. I used %elem and got 32766, I thought that it will extend the array one element at a time and not the defined "dim". Is my thought wrong?, thanks

  7. #7

    Default Dynamic Arrays Revisited

    ** This thread discusses the article: Dynamic Arrays Revisited **
    %ELEM can only work with compiled data, hence the compiled number of array elements is 32766. You have to keep track of the number of element you insert into the array yourself. You can do this if the element are numeric by looking for one that contains zeroes (perhaps) or if theye are character by looking for a blank entry. Note that the user space will be created, by default with an initial value of X'00'. This means each new byte added to the user space is not a blank but a X'00'. This is the most efficient way to handle a user space.

  8. #8
    Guest.Visitor Guest

    Default Dynamic Arrays Revisited

    ** This thread discusses the article: Dynamic Arrays Revisited **
    Bob, What happen with the "User space" when a program crash ? will the System automatically free the Storage or what? another Question, I would like to place more then one Array in the "User space" any Suggestion!!

  9. #9

    Default Dynamic Arrays Revisited

    ** This thread discusses the article: Dynamic Arrays Revisited **
    If the user space is created in QTEMP, it is still in QTEMP. If you restart your program, the user space will still have the data stored in it. You can either take advantage of that or simply clear the user space (by "recreating" it).

+ Reply to Thread

Similar Threads

  1. Practical Array Processing: Dynamic Arrays
    By RingerSoftware in forum RPG
    Replies: 10
    Last Post: 04-03-2009, 08:27 PM
  2. Best of Cozzi: Dynamic Memory and Dynamic Arrays
    By Guest.Visitor in forum RPG
    Replies: 2
    Last Post: 08-11-2004, 08:22 AM
  3. Dynamic Memory and Dynamic Arrays
    By hope@f2s.com in forum RPG
    Replies: 2
    Last Post: 06-20-2002, 12:57 PM
  4. Dynamic Arrays in VARPG
    By B.Morris in forum RPG
    Replies: 3
    Last Post: 01-29-2002, 03:14 PM
  5. New Name revisited
    By Guest.Visitor in forum Analysis
    Replies: 11
    Last Post: 09-21-2000, 07:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts