/* Copyright (C) 1993 by Thomas Glen Smith. All Rights Reserved. */
/* pickdyad APL2 V1.0.0 ************************************************
* Called from dottran to select a scalar dyadic function. *
***********************************************************************/
#define INCLUDES APLTOKEN+APLTOKCD+FUNSTRUC+APLDERIV+FUNCODES
#include "includes.h"
Scalar_dyadics *pickdyad(fun)
void *fun; /* potential scalar function operator */
{
extern int aplerr;
Scalar_dyadics *sdp;
int i;
i = (((Codes *)fun)->funky_flags);
switch (((Codes *)fun)->funky_flags) {
case SCMD: /* dyadic scalars binomial, power, etc. */
sdp = &(((Scalars *)fun)->dyad);
break;
case SCDO: /* dyadic scalars and, less, greater, etc. */
sdp = &(((Rela *)fun)->dyad);
break;
case EQNE: /* equal, not equal */
sdp = &(((Eqne *)fun)->rel.dyad);
break;
default:
sdp = NULL;
} /* end switch */
return(sdp);
}