× 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.



Thanks Scott, your suggestion is exactly what I needed.


Kurt Anderson
Application Developer
Highsmith Inc

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Friday, August 24, 2007 1:08 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Multi-dimensional dynamic arrays

Data structures are, by definition, part of contiguous memory.
Therefore, it doesn't make sense to put the BASED keyword on a subfield
of a data structure. BASED controls the area of memory that something
is located in, and if it MUST be contiguous memory (as is the case of a
DS) then there'd be only one possible value for BASED.

Having said that, what you're trying to accomplish is certainly possible
-- just not the way you're approaching it.

You can put a POINTER in a data structure. Then have a separate array
that's based on that pointer -- this will result in what you're looking
for... a variable-length array that's particular to an element of a
parent array.


Kurt Anderson wrote:
Ok, so I can't have a dynamic array with a subarray that is also
dynamic (more specifically, I can't have a subfield with the Based
keyword). I was curious if this would be something that may be
possible in the future - or if it's simply not possible. Just
throwing this out there to get thoughts.
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.



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.