× 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: Marco Facchinetti <facchinetti@xxxxxxxxx>
  • Date: Tue, 19 Sep 2000 13:46:40 -0700 (PDT)

I guess the module Sleep can easly choose itself if it's
working with a time parameter ('00:15:30') or elapsed time
('300'), the APIs do it why not us..
--- Barbara Morris/Toronto/IBM <bmorris@ca.ibm.com> wrote:
> 
> >Date: Tue, 19 Sep 2000 09:51:41 +0100
> >From: "paul cunnane" <paul@cunnane.net>
> >>    C   CallP  Sleep('for' '00:30:00')
> >>    C   CallP  Sleep('til' '16:30:00')
> >
> >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, I agree about using symbolic constants rather than
> literals, and I
> think coding the constants once only in the /COPY file is
> the best way.
> It's not perfect, since there's nothing stopping someone
> from passing a
> literal, say 2.  But I don't think there's a better way
> using RPG.  In
> general, I think it's a good idea to include some prefix
> in the names,
> to avoid collision and confusion.
> 
> By the way, in this case, I'd avoid the problem by coding
> two procedures:
>   SleepFor
>   SleepTil
> 
> Barbara Morris
> 
> 
> +---
> | 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
> +---


__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
+---
| 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 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.