--- stack/stack.c 2002/03/12 14:53:19 1.105 +++ stack/stack.c 2002/03/12 15:13:48 1.106 @@ -989,7 +989,7 @@ } if(myenv.interactive) { - printf("Stack version $Revision: 1.105 $\n\ + printf("Stack version $Revision: 1.106 $\n\ Copyright (C) 2002 Mats Alritzson and Teddy Hogeborn\n\ Stack comes with ABSOLUTELY NO WARRANTY; for details type `warranty;'.\n\ This is free software, and you are welcome to redistribute it\n\ @@ -1362,6 +1362,26 @@ eval(env); } +extern void sx_656c7365(environment *env) +{ + if(env->head==NULL || CDR(env->head)==NULL + || CDR(CDR(env->head))==NULL || CDR(CDR(CDR(env->head)))==NULL) { + printerr("Too Few Arguments"); + env->err= 1; + return; + } + + if(CAR(CDR(env->head))->type!=symb + || strcmp(CAR(CDR(env->head))->content.sym->id, "if")!=0) { + printerr("Bad Argument Type"); + env->err= 2; + return; + } + + swap(env); toss(env); + ifelse(env); +} + /* "while" */ extern void sx_7768696c65(environment *env) {