Hello!

I have a problem with my perl - c embedding!

In c i have a funcion like:
   double sum (double *array, int n)
   {
          double result = 0;
          int i;

          for (i=0;i<n;i++)
              result += array[i];

          return result;
    }

i want to use it in my .pl file like:

  my @array;
  my $length = @array;
  my $sum;
  .
  .
  $sum = (@array, $length);

    
In my .xs file i write:

   double
   sum (array, n)
       ???

And there is where i am stuck ...

Can anybody help me with that?

Thanks in advance

Roman Y. Asper




#######
" So we�ll go no more a-roving
  So late into the night. "
#######









.

Reply via email to