- g_string_append_printf (string, " CUT(%g)", rd->cut_point);
- g_string_append_printf (string, " ITERATE(%d)", rd->max_iterations);
+
+ GString *categoricals = g_string_new ("");
+ for (node = vars; node; node = node->next)
+ {
+ const struct variable *v = node->data;
+ enum measure m = var_get_measure (v);
+
+ if (m == MEASURE_NOMINAL || m == MEASURE_ORDINAL || var_is_alpha (v))
+ {
+ g_string_prepend (categoricals, var_get_name (v));
+ g_string_prepend (categoricals, " ");
+ }
+ }
+ if (0 != strcmp (categoricals->str, ""))
+ g_string_prepend (categoricals, "\n\t/CATEGORICAL =");
+
+ g_string_append (strx, categoricals->str);
+ g_string_free (categoricals, TRUE);
+ g_slist_free (vars);
+
+ g_string_append (strx, "\n\t/CRITERIA =");
+
+ g_string_append_printf (strx, " CUT(%g)", rd->cut_point);
+
+ g_string_append_printf (strx, " ITERATE(%d)", rd->max_iterations);