|
> From: Scott Klement
>
> Which of the following code samples do you think is the best way to do
it,
> and why?
If your entries have a predefined size and you're using an externally
described data structure to access them, I have a rather elegant way to
do it (at least IMHO):
d Entry e ds extname(myEntry)
d based(p_Entry)
d Entries s like(Entry) dim(MAX)
d based(p_Entries)
c eval pEntries = p_ListHeader + DataOff
c for EntryNo = 1 to NumEntries
c eval pEntry = %addr(Entries(EntryNo))
(process entry)
c endfor
Set MAX to some reasonable maximum value, and voila, you should have no
problems. (Famous last words!)
Joe
This mailing list archive is Copyright 1997-2026 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.