|
I would rather have it set up so that some or all components of a DS could be read-only. Of course, this creates a caveat that if you specify any areas of the data area twice (such as a overlaid field), you might accidentally specify it as constant in one def, then non-constant in another. But that could be caught by the compiler... On Tue, 4 Jan 2005 16:17:49 -0600, Kurt Anderson <kjanderson@xxxxxxxxxxxxx> wrote: > > >If the field really is a constant that will never change even in the > exporter, I don't see the benefit > >of export/import-const over a copy file with named constants. > > You're right. Since the use of Const in a procedure parameter means > that the recipient cannot modify the field, the keyword Const on a > variable should also mean the same thing; so it could be modified within > the module, but outside the module there is only 'read only' access to > it. > > So I guess there is a difference between what I'm suggesting and what's > being suggested with a Data Structure constant. > > In regard to the Data Structure constant, what I something like the > example below could be done? So no longer is it 'S/U', it's 'Type' or > 'C/S/U'. Just brainstorming. > DayOfWeek CDS Qualified > > Then if you wanted to export this (for whatever reason... I guess I > personally never got into the /copy stuff), you could do: > DayOfWeek CDS Qualified Export Const > (or even better, imply the keyword Const when it is a Constant Data > Structure). > > Kurt > > -- > 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. > > -- "Enter any 11-digit prime number to continue..."
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.