/* Copyright (C) 1994 by Thomas Glen Smith. All Rights Reserved. */ /* aplmatcj APL2 V1.0.0 ************************************************ * Called by aplmatci to transform, if necessary, data from some * * numeric type to complex. * ***********************************************************************/ #define INCLUDES APLCB #include "includes.h" int aplmatcj(ad, type, x) Apluptr ad; /* Data pointer. */ int type; /* Data type. */ double *x; /* Array of two doubles to contain complex number. */ { switch(type) { case APLINT: *x = *ad.aplint; *(x+1) = .0; break; case APLNUMB: *x = *ad.apldata; *(x+1) = .0; break; default: /* m/b APLCPLX */ *x = *ad.apldata; *(x+1) = *(ad.apldata+1); break; } /* end switch */ }