|
CWilt@xxxxxxxxxxxx wrote: > > Barbara (or anyone else) > > Can you provide some more detail on what is going on here. Specifically, > what's the relationship/use of MaxPtyAlpha and MaxPtyA? > > > And to eliminate the hardcoding of the dimension: > > > > D MaxPtyAlpha > > D MaxPtyA Overlay(MaxPtyAlpha) > > D MaxPty1 10i 0 Overlay(MaxPtyA:*next) > > ... > > D MaxPty 10i 0 Overlay(MaxPtyAlpha) > > D Dim(%Div(%Size(MaxPtyA) > > D :%Size(MaxPty1))) > > If I tried to define MaxPty with Overlay(MaxPtyA), then MaxPtyA would never get defined. When you have a field like MaxPtyA whose length is defined by the overlaying fields, then you can't make the definition of one of the overlaying fields dependent on the definition of the overlaid field. Ok, that's pretty well unintelligible ... let me try again. If I code the following, then the length of Over is determined by the lengths of Elem1 and ElemArr (the fields which overlay it). The length of ElemArr depends on its Dim keyword which can't be determined until Over is defined, because of %Size(Over). So the definition of Over depends on the definition of ElemArr which depends on Over ... D Over D Elem1 10i 0 Overlay(Over:*next) D ElemArr 10i 0 Overlay(Over) D Dim(%Div(%Size(Over) D :%Size(Elem1))) So I add an extra field for ElemArr to overlay, so that ElemArr doesn't have to overlay Over, so Over's size can be determined just by Elem1 etc. D OverOver D Over Overlay(OverOver) D Elem1 10i 0 Overlay(Over:*next) D ElemArr 10i 0 Overlay(Over) D Dim(%Div(%Size(OverOver) D :%Size(Elem1))) Hope that makes sense.
As an Amazon Associate we earn from qualifying purchases.
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.