Problem with a C predicate and write on the output

From: ludovic picouays <ludovic.picouays_at_gmail.com>
Date: Wed 01 Jun 2005 08:47:42 AM GMT
Message-ID: <a26b4fee050601014748100468@mail.gmail.com>
I wrote a C predicate, I call it when a variable is modified. There is
no problem with that.
When I want to print something on the output before calling this
predicate, I must use write/1, otherwise it doesn't work.

write("hello"),
cumulativeflow(Ri,Pi,Di,NbTache,NbMachine),

this works.

(cumulativeflow is my C predicate, I export it by loading a module
before execution.)


but if I use writeln/1 or write/1 and ln just after :

writeln("hello"),
cumulativeflow(Ri,Pi,Di,NbTache,NbMachine),

I have this error message :

Segmentation violation - possible reasons are:
- a faulty external C function
- certain operations on circular terms
- machine stack overflow
- an internal error in ECLiPSe
ECLiPSe may have become unstable, restart recommended

I don't know what is the problem, but I need to see several terms so
all of them on the same line is not really appropriate.
If you had some solution...

Best Regards
Received on Wed Jun 01 09:53:40 2005

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:36 PM GMT GMT