#argmap(out) complex solution[2]
   {
   SLang_Array_Type *at;
   double *elements;
   int dims = 2;

   at = SLang_create_array (SLANG_COMPLEX_TYPE, 0, NULL, &dims, 1);
   if (at == NULL) {
	SLang_verror(SL_INTRINSIC_ERROR, "could not allocate complex array");
	return;
   }
   elements = (double*)at->data;	/* memcpy cannot be used here, b/c  */
   *elements	 = $1[0].r;		/* FORTRAN complex uses single-prec */
   *(elements+1) = $1[0].i;		/* reals for each component	    */
   *(elements+2) = $1[1].r;
   *(elements+3) = $1[1].i;
   (void)SLang_push_array (at, 1);
   }
#end

#prototype (fortran)
   % FORTRAN subroutine example
   void qsolve(real*, real*, real*, complex solution[2]);

   % FORTRAN function examples: note that the double complex return value
   % is reflected in the C interface as an extra/prepended parameter
   void dcmult(doublecomplex *OUTPUT, doublecomplex *a, doublecomplex *b);
   void cmult(complex *OUTPUT, complex *a, complex *b);

   % Also note that the prototyped function names need not contain a trailing
   % suffix;  the (fortran) qualifier ensures that proper matching will occur
#end

#ignore
   rzero_
#end
