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



Actually, I just tried it with *NEW and with QILE, both worked similar--left
the console window open. 

-Bob Cozzi
www.RPGxTools.com
RPG xTools - Enjoy programming again.


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Bob Cozzi
Sent: Monday, November 07, 2005 2:37 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Using printf in RPG and keeping the console open - again

H BNDDIR('QC2LE')                                            
                                         
D GetChar         PR                  ExtProc('getchar')     
C                   callp     GetChar()                        

With a Named-activation group, this works great. :)

-Bob Cozzi
www.RPGxTools.com
RPG xTools - Enjoy programming again.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Larry Ducie
Sent: Monday, November 07, 2005 11:44 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Using printf in RPG and keeping the console open - again

Hi Scott,

<snip>
It's not different.  You're crazy. :)
</snip>

lol.

OK. if in doubt - Test it! I've just written this lovely little program:

#include <stdio.h>

int main()
{
    printf("Certainly not another Hello World program!\n");
    return 0;
}

>From this:

I created a C module using: CRTCMOD MODULE(PEDLIB/TEST1) 
SRCFILE(PEDLIB/QCSRC)

I created a program object using: CRTPGM PGM(PEDLIB/TEST1) 
MODULE(PEDLIB/TEST1) ACTGRP(QILE)

When I run the program from a command line I see the console flash and then 
disappear - you're right! That's exactly what I get from RPG. Now I'm 
wondering what Barbara actually did write about C handling printf 
differently to RPG. They seem to have behaved the same way.

Maybe there was something Simon alluded to in his mail that I missed. It 
wouldn't be the first time. :-)

Thanks Scott.

Larry Ducie



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.