Metropoli BBS
VIEWER: execjotd.c MODE: TEXT (ASCII)
/* Copyright (C) 1993 by Thomas Glen Smith.  All Rights Reserved. */
/* execjotd APL2 V1.0.0 ************************************************
* Called from execjot when the data types of either of the two         *
* arguments is character.                                              *
***********************************************************************/
#define INCLUDES APLCHDEF+APLTOKEN+FUNSTRUC
#include "includes.h"
Aplcb execjotd(left,rite,ltype,rtype,rfun)
Aplcb left,rite;/* left and right operands */
int ltype,rtype;         /* data types of left and right operands */
void *rfun;              /* function definition - see aplstruc.h */
{
     Errstop; Outrprdp; Outrprdx;
     int i;

     switch (((Codes *)rfun)->funky_code) {
          case EQUAL:         i = 0; break;
          case NOT_EQUAL:     i = 1; break;
          default:  return(errstop(75,left,rite,NULL));
     } /* end switch */
     if (ltype == rtype) /* both are character */
          return(outrprdp(((Eqne *)rfun)->ph,left,rite));
     else /* one argument is character, the other isn't */
          return(outrprdx(i,left,rite));
     return(errstop(78,left,rite,NULL)); /* no output */
}
[ RETURN TO DIRECTORY ]