[GAP Forum] InstallCharReadHookFunc

Jose Joao Morais jjoao at netcabo.pt
Mon Apr 5 22:34:19 BST 2004

Dear GAP Forum,

	I have the following code:

gap> d := Directory("/home/josejoao/Projects/project2/src");;
gap> f := Filename(d, "gapmenu");;
gap> gapmenustream := InputOutputLocalProcess(d,f,[]);;
gap> func := function()
>     Print(ReadAll(gapmenustream));
> end;;
gap> InstallCharReadHookFunc( gapmenustream, "r", func );

	But as soon as there is somethig ready to be read from the stream, I
get the following error:

gap> Function: number of arguments must be 0 (not 1)
not in any function
Entering break read-eval-print loop ...
you can 'quit;' to quit to outer loop, or
you can replace the argument list <args> via 'return <args>;' to

	Can someone tell me what is wrong in this?

	Thank you,
	Jose Morais

More information about the Forum mailing list