Metropoli BBS
VIEWER: genint.c MODE: TEXT (ASCII)
/* Copyright (C) 1994 by Thomas Glen Smith.	All Rights Reserved. */
/* genint APL2 V1.0.0 **************************************************
* Called by dyadixp and scalax.                                        *
* Generates an APL variable of integer type, of identical shape as the *
* argument, containing all zeros.								 *
***********************************************************************/
#define INCLUDES APLCB
#include "includes.h"
Aplcb genint(big,iv)
Aplcb big;
int iv; /* value to be replicated in the new output variable. */
{
	Getcb; Intcopy;
     extern int aplerr;
	int *ip;
     Aplcb out;

	out = getcb(NULL, big->aplcount, APLINT+APLTEMP, big->aplrank, NULL);
     if (aplerr) return(NULL);
	if (out->aplrank > 1)
		ip = intcopy(out->apldim, big->apldim, out->aplrank, 1);
	if (out->aplcount)
		ip = intcopy(out->aplptr.aplint, &iv, out->aplcount, 0);
     return(out);
}
[ RETURN TO DIRECTORY ]