× 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: booth@xxxxxxxxxxxx
  • Date: Wed, 20 Sep 2000 00:03:53 GMT

As usual your suggestion is best.  Much better.  Two procedures it shall 
be.  Now, (every body skips over the easy stuff!) why do I want to use 

"CallP   Sleepfor('00:30:00')" 

instead of 

"Call   'SleepFor'"
"Parm   '00:30:00'    Parm8       8"

I understand that for most of you this is pretty basic, but hey, I just 
don't know the answer.

_______________________
Booth Martin
Booth@MartinVT.com
http://www.MartinVT.com
_______________________




Barbara Morris/Toronto/IBM <bmorris@ca.ibm.com>
Sent by: owner-rpg400-l@midrange.com
09/19/2000 03:13 PM
Please respond to RPG400-L

 
        To:     RPG400-L@midrange.com
        cc: 
        Subject:        Re: how to let my program sleep a while


>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
+---




+---
| 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:

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.