× 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: how to let my program sleep a while
  • From: Scott Klement <klemscot@xxxxxxxxxxxx>
  • Date: Tue, 19 Sep 2000 10:26:43 -0500 (CDT)



On Tue, 19 Sep 2000, paul cunnane wrote:

> This raises an interesting question.  If I was coding this, I would tend to
> use symbolic constants (I don't trust string literals):
> 
>     D   FOR       C               0
>     D   UNTIL     C               1
> 
>     C   CallP  Sleep(FOR '00:30:00')
> 
> The question is, how do I make these constants available to the client of a
> service program?  I can't EXPORT a CONST from a module.
> 
> The workaround I have used is to code the constant declarations into the
> /COPY member with the prototypes, which makes them available to both the
> service program and the client.  Is there a better way?
> 
> --
> Paul
> 
> 

The /COPY approach is the method that I use for this.  Its also the method
that is used in other languages like C, and also on other platforms (such
as both UNIX and Windows)

I personally don't use EXPORTs at all.  I don't want one module to be able
to change the contents of a variable in another module -- that upsets my
idea of a "black box" approach to writing modules.



+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.