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



fwiw, this:

D wString s 30
D ARRAYS ds
D ARR1 4 inz('hHfF')
D ARR2 24 inz('headerHEADERfooterFOOTER')
D Array1 1 dim(4) overlay(ARR1)
D Array2 6 dim(4) overlay(ARR2)
/FREE
dsply ARRAYS;
dsply ARR1;
dsply ARR2;
wString = Array1(3);
dsply wString;
wString = Array2(3);
dsply wString;
*inlr = *on;

gave this result:

DSPLY hHfFheaderHEADERfooterFOOTER
DSPLY hHfF
DSPLY headerHEADERfooterFOOTER
DSPLY f
DSPLY footer

Somewhere in there is what you are looking for, I believe?

Maybe this?
D ds
D ARR1 4 inz('hHfF')
D ARR2 24 inz('headerHEADERfooterFOOTER')
D Array1 1 dim(4) overlay(ARR1)
D Array2 6 dim(4) overlay(ARR2)


On 8/8/2013 3:48 PM, craig@xxxxxxxxxx wrote:
Jon summarizes my take on it. If all of the other data in the program
(standalone fields, constants, data structure subfields) can be INZ'd on a
D-spec, why would I want to do something else for an array?

Most of the suggestions seem to be to initialize the values in strings and
use the overlay technique. Since that seems to be the most widely offered
suggestion, I would take that to be the current "best practice".

The applicaiton that I'm using has a known, finite, practically guaranteed
set of values that won't change ('footer', 'header' in my example, another
is 'top', 'bottom', 'left', 'right'). For simple data like that, I want it
hard-coded into the D-specs, no need to load it from a database.

I hoped that something like the following would have been possible
(apologize in advance if the formatting is thrown off, it lined up when I
typed it in).

D Array1 1 dim(4) inz('fFhH')
D Array2 6 dim(4) inz('footer+
D footer+
D header+
D header')

Thanks for all of the suggestions and follow-up.

Craig Pelkie



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.