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.