Hi, I have a question about loadfunc() on Unix.

I have 

procedure eq(x,y,e)
  /e := 10
  return (eq := loadfunc(RLIB, "eqI"))(x,y,e)
end

where 

                int eqI(int argc, descriptor argv[]) 
etc.

In my Icon code I'd like to sometimes call eq(1,2), with e defaulting to 10, and
sometimes eq(1,2,6) or eq(1,2,3), etc. The problem is that if I say 
               
               x:= eq(1,2,3)

in my Icon code, and later say

                 y := eq(1,2)

I get the error

Run-time error 102
File /home/ko/t.icn; Line 7
numeric expected
Traceback:
   main()
   eqI(1,2) from line 7 in /home/ko/t.icn

So apparently the function got loaded with 3 arguments, and expects 3 in the
future. 

How does one deal with this?


                                        Kostas

_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to