[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] Changes to pspp/src/do-if.c
From: |
Ben Pfaff |
Subject: |
[Pspp-cvs] Changes to pspp/src/do-if.c |
Date: |
Tue, 01 Mar 2005 03:16:24 -0500 |
Index: pspp/src/do-if.c
diff -u pspp/src/do-if.c:1.9 pspp/src/do-if.c:1.10
--- pspp/src/do-if.c:1.9 Tue Jun 1 04:57:25 2004
+++ pspp/src/do-if.c Tue Mar 1 08:16:15 2005
@@ -24,7 +24,7 @@
#include "alloc.h"
#include "command.h"
#include "error.h"
-#include "expr.h"
+#include "expressions/public.h"
#include "lexer.h"
#include "str.h"
#include "var.h"
@@ -244,7 +244,7 @@
struct do_if_trns *t;
struct expression *e;
- e = expr_parse (EXPR_BOOLEAN);
+ e = expr_parse (default_dict, EXPR_BOOLEAN);
if (!e)
return NULL;
if (token != '.')
@@ -276,15 +276,15 @@
int case_num UNUSED)
{
struct do_if_trns *t = (struct do_if_trns *) trns;
- union value bool;
+ double boolean;
- expr_evaluate (t->cond, c, case_num, &bool);
- if (bool.f == 1.0)
+ boolean = expr_evaluate_num (t->cond, c, case_num);
+ if (boolean == 1.0)
{
debug_printf ((_("DO IF %d: true\n"), t->h.index));
return -1;
}
- else if (bool.f == 0.0)
+ else if (boolean == 0.0)
{
debug_printf ((_("DO IF %d: false\n"), t->h.index));
return t->false_jump;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] Changes to pspp/src/do-if.c,
Ben Pfaff <=