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



Lim,

what is your point? It was you who brought up the question of subprocedures, 
that may call subroutines in the main line or other subprocedure to initialize 
global variables.

I think, you have to redesign your application, if you want to do such a thing. 
Initialing global variables should be done at the beginning of a loop 
(iteration) in the main line, either in a subroutine or a subprocedure.

Because if you want to call a subroutine that is outside a subprocedure, the 
simplest solution is to transform that subroutine into a subprocedure. So it is 
accessable from any part in the programme.

And personally, I do not see a difference in a subroutine or a subprocedure. 
Both have their usefullness, depending on the structure of the code, the 
problem to solve. For me, a subroutine can be called from any part in the code 
as well (hence my dislike of opcode LEAVESR: where will I jump back to?); I do 
not need a subprocedure for that.

Just my 2 Euro-cents.

Regards,
Carel Teijgeler.

*********** REPLY SEPARATOR  ***********

On 24-8-04 at 8:52 Lim Hock-Chai wrote:

>Joe P and Bob C:
>It is true that using you save some typing time when using sub-routine. 
>However, the problem comes when sometime in the future you happen to have to 
>create a sub-proc and it really need to execute one >the of sub-routine that 
>was created because of you want to save some tying time.
>
>Joe L:  
>For some reasons you seems to think that it is reaaaally bad to access/update 
>global variables from sub-proc.  I don't know about >your shop, but if I apply 
>such a rule in my shop, I don't think I will be using sub-proc very often at 
>all.  All fields from F spec are >global.  In most case, I need to use them in 
>most of my sub-proc.  If would be quite a pain if I've to pass them in every 
>time I need >them. I'm not saying that it is good to access/update them in 
>sub-proc, but if you design it correctly, it should be fine.




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.