Improve error message for creating a new string var with COMPUTE or IF.
[pspp] / src / language / xforms / select-if.c
index 4240f63b47b94e2f79a972c4954e2275c457ab38..72284f36539ca14d658c3298612b0e8d13ca0034 100644 (file)
@@ -18,8 +18,8 @@
 
 #include <stdlib.h>
 
+#include "data/dataset.h"
 #include "data/dictionary.h"
-#include "data/procedure.h"
 #include "data/transformations.h"
 #include "data/variable.h"
 #include "language/command.h"
@@ -50,7 +50,7 @@ cmd_select_if (struct lexer *lexer, struct dataset *ds)
   struct expression *e;
   struct select_if_trns *t;
 
-  e = expr_parse (lexer, ds, EXPR_BOOLEAN);
+  e = expr_parse_bool (lexer, NULL, ds);
   if (!e)
     return CMD_CASCADING_FAILURE;
 
@@ -125,5 +125,5 @@ cmd_filter (struct lexer *lexer, struct dataset *ds)
       dict_set_filter (dict, v);
     }
 
-  return lex_end_of_command (lexer);
+  return CMD_SUCCESS;
 }