Metropoli BBS
VIEWER: isignp.c MODE: TEXT (ASCII)
/* Copyright (C) 1994 by Thomas Glen Smith.  All Rights Reserved. */
/* isignp APL2 V1.0.0 **************************************************
* The integer result depends on the sign of the integer argument x,    *
* being -1 if x<0, 0 if x==0, and +1 if x>0.                           *
***********************************************************************/
#define INCLUDES 0
#include "includes.h"
void isignp(x,ret)
int *x,*ret;
{
	if (*x < 0)      *ret = -1;
	else if (*x > 0) *ret = +1;
	else             *ret = 0;
}
[ RETURN TO DIRECTORY ]