(cmd_data_list): Don't allow END subcommand to be used with DATA LIST
[pspp-builds.git] / src / language / data-io / data-list.c
index 4e2f083bee9077f2f69c990624fc6694b8ed0749..75db52af6548f61baa214f9250856778565fb53b 100644 (file)
@@ -249,6 +249,12 @@ cmd_data_list (struct lexer *lexer, struct dataset *ds)
   if (dls->type == -1)
     dls->type = DLS_FIXED;
 
+  if (dls->type != DLS_FIXED && dls->end != NULL)
+    {
+      msg (SE, _("The END keyword may be used only with DATA LIST FIXED."));
+      goto error;
+    }
+
   if (table == -1)
     table = dls->type != DLS_FREE;