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


  • Subject: Re: Array question
  • From: Rob Berendt <rob@xxxxxxxxx>
  • Date: Tue, 4 May 1999 9:19:02 -0500

I really don't feel that we've answered the original question yet.

A compile time array is an array in which all of the data is stored in the 
program, at the bottom of the program.  Useful for data that almost never 
changes.  For example, (if you only write code for one language), you could 
store the days of the week in a compile time array in the program.

A preexecution time array is actually a table file, physical or logical, read 
in its entirety and stored into an array, prior to any execution of the 
program.  
Useful for data that minimal change is expected.  If the table file is 
refreshed 
the program must be reloaded to refresh the table.  For example if your store 
the days of the week in a file, in different language libraries, then you could 
use it for this purpose.

An execution time array is where the loading is completely under program 
control.

Now for the challange question.  Which of the three kinds of arrays best 
defines 
the following?
D                 DS                                               
D DayData                       21    Inz('MonTueWedThuFriSatSun') 
D DayArray                       3    Overlay(DayData) Dim(7)      
                                                                   
C                   Return    %TrimR(DayArray(DayOfWeek(WorkDate)))





boldt@ca.ibm.com on 05/04/99 08:00:57 AM
Please respond to RPG400-L@midrange.com@Internet
To:     RPG400-L@midrange.com@Internet
cc:      

Subject:        Re: Array question



Booth wrote:
>An example of a pre-execution array might be the States of the Union.
>That is fixed and you know right now what they are, so go ahead and load
>the array now and save some time and overhead later on.  An execution time
>array might be states in which customers live. Until you read the
>customer's address you won't know which states to load, so you have to
>fill that array while you are executing the program.
>
>
>In <199905031408.WAA07035@public.sta.net.cn>, on 05/03/99
>   at 09:59 PM, "Shen Jianjun" <ipacsjj@public.sta.net.cn> said:
>
>>How can understand the Pre-execution time array & Execution time array?
>>Could you give me one simple example?

BTW, the politically correct terms are "prerun-time array" and
"run-time array".  We haven't used the word "execution" in our
manuals in at least 15 years.

Do programmers still use prerun-time arrays in new apps?

Cheers!  Hans

Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.