× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Two comments:

1) why not use *NEXT ?

2) How much do you anticipate growing the array? You show DIM(1) times 56. DIM(1000) times 56 is only 56,000. Is 1000 elements enough? If so, why waste energy coding all the extra stuff? Just do it.

Grizzly M wrote:
I'm sure this has been asked before but I can't seem to find what I'm
looking for in the archives

I'll post the code that I have to help paint the picture
D AddItmIdx S 5S 0 Inz(0) D BuyItmIdx S 5S 0 Inz(0)
D                 DS
D BuyerInfo                     56A   DIM(1)
D   Buyer                        3A   Overlay(BuyerInfo:1)
D   Item                        27A   Overlay(BuyerInfo:4)
D   Quantity                    11S 2 Overlay(BuyerInfo:31)
D   LastPurch                    8S 0 Overlay(BuyerInfo:43)
D   Vendor                       6A   Overlay(BuyerInfo:51)

/Free

 BuyItmIdx = %LookUp(PBITNO:Item);
 IF BuyItmIdx > 0;
    Quantity(BuyItmIdx) = PBORQT;

    If WrkDate > LastPurch(BuyItmIdx);
       LastPurch(BuyItmIdx) = WrkDate;
    EndIF;

Else;
    AddItmIdx += 1;
    Buyer(AdditmIdx) = PBVNNO;
    Item(additmidx) = PBITNO;
    Quantity(Additmidx) = PBORQT;
    LastPurch(AddItmIdx) = WrkDate;
    Vendor(AddItmIdx) = PBVNNO;
 EndIF;

/Free
I want to be able to increase the size of the array on an as needed
basis. I'm pretty sure this can be done with pointers, but I can't
figure out how. Can anyone offer some suggestions?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.