[Gambas-user] Reading from Process
Peter Moers
peter.moers at ...626...
Fri Apr 14 23:14:46 CEST 2006
fflush(stdout); did the job for the command line example
moved my procedure from a module to the main form and now things go fine.
thanks for your help!
2006/4/12, Benoit Minisini <gambas at ...1...>:
> On Tuesday 11 April 2006 17:21, Peter Moers wrote:
> > hi,
> > Yet another problem :).
> > To control the parallel port I've written a small program in C that
> > keeps running waiting for input. Sending text to the process goes good
> > with PRINT #$hProc... But when I do printf("blah\n") in C
> > Process_Read() isn't fired in Gambas. I tried to run my program in the
> > console example and it has the same problem. When I make it crash (no
> > error handling at all in my C program) I get the error message but not
> > my data right before it ends. In a terminal it does what it has to do.
> > It's probably something in the C program. I always end printf with \n
> > but that seems not to be enough to fire Process_Read() although the
> > program is EXEC ["lptcmd"] FOR READ WRITE.
> > I just learned some C to write this program, so if printf() isn't good
> > please explain what I should use and why. Maybe one day I'll speak C
> > and Gambas fluently :)
> >
> > regards,
> >
> > --
> > Peter Moers
> > peter.moers at ...1417...
> > Divides Webdesign - http://www.divides.be
> > Startpagina - http://www.321start.be
> >
>
> What happens if you call 'fflush(stdout)' just after your printf() ?
>
> --
> Benoit Minisini
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Peter Moers
peter.moers at ...1417...
Divides Webdesign - http://www.divides.be
Startpagina - http://www.321start.be
More information about the User
mailing list