more work
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 28 Dec 2021 05:03:13 +0000 (21:03 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 1 Jan 2022 19:17:32 +0000 (11:17 -0800)
src/language/stats/ctables.c

index 1b8ba198f83cca7c882e2b3140e729a698a7d270..624331ba5d108429fcd220aca672eef66de6be65 100644 (file)
@@ -216,12 +216,7 @@ struct ctables_postcompute_expr
         /* CTPO_CAT_RANGE.
 
            XXX what about string ranges? */
-        struct
-          {
-            double low;         /* -DBL_MAX for LO. */
-            double high;        /* DBL_MAX for HIGH. */
-          }
-        range;
+        double range[2];
 
         /* CTPO_ADD, CTPO_SUB, CTPO_MUL, CTPO_DIV, CTPO_POW. */
         struct ctables_postcompute_expr *subs[2];
@@ -1526,7 +1521,6 @@ cmd_ctables (struct lexer *lexer, struct dataset *ds)
       if (!lex_force_match (lexer, T_SLASH))
         break;
 
-      /* XXX Validate axes. */
       while (!lex_match_id (lexer, "TABLE") && lex_token (lexer) != T_ENDCMD)
         {
           if (lex_match_id (lexer, "SLABELS"))
@@ -1857,6 +1851,13 @@ cmd_ctables (struct lexer *lexer, struct dataset *ds)
               goto error;
             }
         }
+
+      if (t->row_labels != CTLP_NORMAL && t->col_labels != CTLP_NORMAL)
+        {
+          msg (SE, _("ROWLABELS and COLLABELS may not both be specified."));
+          goto error;
+        }
+
     }
   while (lex_token (lexer) != T_ENDCMD);
   ctables_destroy (ct);