Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
I need to create an array pointer that point to a DS that has an array in it. Below is what I came up with. D listMast s * dim(512) D list ds based(list_p) qualified D lastElem 5i 0 D item 50 dim(10000)
This won't work. The "list" data structure is 500002 bytes long. The maximum size of a named data structure is 65535 bytes long.
listMast(1) = %alloc(%size(list.lastElem)+%size(list.item)*100); listMast(2) = %alloc(%size(list.lastElem)+%size(list.item)*100);
Here's you're only allocating memory for 100 items, despite that your dim() lists 10000. Is that intentional?
Can I ask what you're doing to accomplish? You've used an array of pointers for something that doesn't require pointer logic. Yet, you've used a big huge array for something else that probably does require pointer logic. What's your goal?
This mailing list archive is Copyright 1997-2026 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.