PSPP NEWS -- history of user-visible changes.
-Time-stamp: <2006-04-03 10:56:18 blp>
+Time-stamp: <2006-05-06 13:24:08 blp>
Copyright (C) 1996-9, 2000 Free Software Foundation, Inc.
See the end for copying conditions.
Changes since 0.4.2:
+ The PROCESS IF command, which was deprecated, has been removed. You
+ may replace any usage of it by SELECT IF following TEMPORARY, which
+ has the same effect.
\f
Changes since 0.4.0 to 0.4.1:
-Time-stamp: <2006-05-06 11:03:32 blp>
+Time-stamp: <2006-05-06 11:38:03 blp>
Procedure processing:
* LAG need not be as much of a special case.
-* Push PROCESS IF, FILTER, N OF CASES out of procedure.c.
+* Push FILTER, N OF CASES out of procedure.c.
* Change sources into state machines?
3. Write case to replacement active file.
4. Execute temporary transformations. If these drop the case, stop.
5. Post-TEMPORARY N OF CASES. If we have already analyzed N cases, stop.
-6. FILTER, PROCESS IF. If these drop the case, stop.
+6. FILTER. If this drops the case, stop.
7. Pass case to procedure.
Ugly cases:
because AGGREGATE creates its own case sink and writes to it in step 7. Also,
TEMPORARY has no effect and we just cancel it. Regardless of direction of
output, we should not implement AGGREGATE through a transformation because that
-will fail to honor FILTER, PROCESS IF, N OF CASES.
+will fail to honor FILTER, N OF CASES.
ADD FILES: Essentially an input program. It silently cancels unclosed LOOPs
and DO IFs. If the active file is used for input, then runs EXECUTE (if there
* Before TEMPORARY, selection is permanent. After TEMPORARY,
selection stops after a procedure.
-PROCESS IF
-
- * Always selects cases sent to the procedure.
-
- * No effect on cases sent to sink.
-
- * Always stops after a procedure.
-
SPLIT FILE
* Ignored by AGGREGATE. Used when procedures write matrices.
* RENAME VARIABLES is invalid after TEMPORARY.
- * WEIGHT, SPLIT FILE, N OF CASES, FILTER, PROCESS IF apply only to
+ * WEIGHT, SPLIT FILE, N OF CASES, FILTER apply only to
the next procedure when used after TEMPORARY.
WEIGHT
@menu
* FILTER:: Exclude cases based on a variable.
* N OF CASES:: Limit the size of the active file.
-* PROCESS IF:: Temporarily excluding cases.
* SAMPLE:: Select a specified proportion of cases.
* SELECT IF:: Permanently delete selected cases.
* SPLIT FILE:: Do multiple analyses with one command.
OFF}. However, if @cmd{FILTER} is placed after TEMPORARY, it filters only
the next procedure or procedure-like command.
-@node N OF CASES, PROCESS IF, FILTER, Data Selection
+@node N OF CASES
@section N OF CASES
@vindex N OF CASES
Transformation procedures performed after @cmd{N} is executed
@emph{do} cause cases to be discarded.
-@cmd{SAMPLE}, @cmd{PROCESS IF}, and @cmd{SELECT IF} have
+@cmd{SAMPLE} and @cmd{SELECT IF} have
precedence over @cmd{N}---the same results are obtained by both of the
following fragments, given the same random number seeds:
When @cmd{N} is specified after @cmd{TEMPORARY}, it affects only
the next procedure (@pxref{TEMPORARY}).
-@node PROCESS IF, SAMPLE, N OF CASES, Data Selection
-@section PROCESS IF
-@vindex PROCESS IF
-
-@example
-PROCESS IF expression.
-@end example
-
-@cmd{PROCESS IF} temporarily eliminates cases from the
-data stream. Its effects are active only through the execution of the
-next procedure or procedure-like command.
-
-Specify a boolean expression (@pxref{Expressions}). If the value of the
-expression is true for a particular case, the case will be analyzed. If
-the expression has a false or missing value, then the case will be
-deleted from the data stream for this procedure only.
-
-Regardless of its placement relative to other commands, @cmd{PROCESS IF}
-always takes effect immediately before data passes to the procedure.
-Only one @cmd{PROCESS IF} command may be in effect at any given time.
-
-The effects of @cmd{PROCESS IF} are similar, but not identical, to the
-effects of executing @cmd{TEMPORARY}, then @cmd{SELECT IF}
-(@pxref{SELECT IF}).
-
-The filtering performed by @cmd{PROCESS IF} takes place immediately
-before cases pass to a procedure for analysis. Because @cmd{PROCESS
-IF} affects only a single procedure, its placement relative to
-@cmd{TEMPORARY} is unimportant.
-
-@cmd{PROCESS IF} is deprecated. It is included for compatibility with
-old command files. New syntax files should use @cmd{SELECT IF} or
-@cmd{FILTER} instead.
-
-@node SAMPLE, SELECT IF, PROCESS IF, Data Selection
+@node SAMPLE
@section SAMPLE
@vindex SAMPLE
"PRINT FORMATS"
"PRINT SPACE"
"PROCEDURE OUTPUT"
- "PROCESS IF"
"PROXIMITIES"
"Q"
"QUICK CLUSTER"
+Sat May 6 12:38:55 2006 Ben Pfaff <blp@gnu.org>
+
+ Continue reforming procedure execution. In this phase, remove
+ PROCESS IF, which was deprecated anyway and can be easily
+ simulated with TEMPORARY followed by SELECT IF.
+
+ * procedure.c: (open_active_file) Don't call
+ add_process_if_trns().
+ (discard_variables) Get rid of redundant call to
+ proc_cancel_all_transformations().
+ (add_process_if_trns) Removed.
+ (process_if_trns_proc) Removed.
+ (process_if_trns_free) Removed.
+
Sat May 6 10:58:05 2006 Ben Pfaff <blp@gnu.org>
Continue reforming procedure execution. In this phase, add
#include <data/storage-stream.h>
#include <data/transformations.h>
#include <data/variable.h>
-#include <language/expressions/public.h>
#include <libpspp/alloc.h>
#include <libpspp/misc.h>
#include <libpspp/str.h>
static void add_case_limit_trns (void);
static void add_filter_trns (void);
-static void add_process_if_trns (void);
static bool internal_procedure (bool (*case_func) (const struct ccase *,
void *),
&& trns_chain_is_empty (permanent_trns_chain))
{
n_lag = 0;
- expr_free (process_if_expr);
- process_if_expr = NULL;
dict_set_case_limit (default_dict, 0);
dict_clear_vectors (default_dict);
return true;
{
add_case_limit_trns ();
add_filter_trns ();
- add_process_if_trns ();
/* Finalize transformations. */
trns_chain_finalize (cur_trns_chain);
free_case_sink (vfm_sink);
vfm_sink = NULL;
- /* Cancel TEMPORARY, PROCESS IF, FILTER, N OF CASES, vectors,
- and get rid of all the transformations. */
dict_clear_vectors (default_dict);
permanent_dict = NULL;
return proc_cancel_all_transformations ();
vfm_source = NULL;
proc_cancel_all_transformations ();
-
- expr_free (process_if_expr);
- process_if_expr = NULL;
-
- proc_cancel_temporary_transformations ();
}
\f
/* Returns the current set of permanent transformations,
return (f != 0.0 && !mv_is_num_missing (&filter_var->miss, f)
? TRNS_CONTINUE : TRNS_DROP_CASE);
}
-\f
-static trns_proc_func process_if_trns_proc;
-static trns_free_func process_if_trns_free;
-
-/* Adds a temporary transformation to filter data according to
- the expression specified on PROCESS IF, if any. */
-static void
-add_process_if_trns (void)
-{
- if (process_if_expr != NULL)
- {
- proc_start_temporary_transformations ();
- add_transformation (process_if_trns_proc, process_if_trns_free,
- process_if_expr);
- process_if_expr = NULL;
- }
-}
-/* PROCESS IF transformation. */
-static int
-process_if_trns_proc (void *expression_,
- struct ccase *c UNUSED, int case_nr UNUSED)
-
-{
- struct expression *expression = expression_;
- return (expr_evaluate_num (expression, c, case_nr) == 1.0
- ? TRNS_CONTINUE : TRNS_DROP_CASE);
-}
-
-/* Frees a PROCESS IF transformation. */
-static bool
-process_if_trns_free (void *expression_)
-{
- struct expression *expression = expression_;
- expr_free (expression);
- return true;
-}
int cnt; /* Number of variables. */
};
\f
-/* PROCESS IF expression. */
-extern struct expression *process_if_expr;
-\f
struct ccase;
void dump_split_vars (const struct ccase *);
\f
+Sat May 6 13:25:25 2006 Ben Pfaff <blp@gnu.org>
+
+ Continue reforming procedure execution. In this phase, remove
+ PROCESS IF, which was deprecated anyway and can be easily
+ simulated with TEMPORARY followed by SELECT IF.
+
+ * command.def: Removed PROCESS IF.
+
Mon May 1 18:17:52 2006 Ben Pfaff <blp@gnu.org>
Further clean up the CMD_* command result codes.
DEF_CMD (S_DATA, 0, "MODIFY VARS", cmd_modify_vars)
DEF_CMD (S_DATA, 0, "ONEWAY", cmd_oneway)
DEF_CMD (S_DATA, 0, "PEARSON CORRELATIONS", cmd_correlations)
-DEF_CMD (S_DATA, 0, "PROCESS IF", cmd_process_if)
DEF_CMD (S_DATA, 0, "REGRESSION", cmd_regression)
DEF_CMD (S_DATA, 0, "RENAME VARIABLES", cmd_rename_variables)
DEF_CMD (S_DATA, 0, "SAMPLE", cmd_sample)
#include <data/value.h>
#include <data/variable.h>
#include <gsl-extras/gsl-extras.h>
+#include <language/expressions/public.h>
#include <libpspp/compiler.h>
#include <libpspp/message.h>
#include <libpspp/misc.h>
+Sat May 6 13:25:57 2006 Ben Pfaff <blp@gnu.org>
+
+ Continue reforming procedure execution. In this phase, remove
+ PROCESS IF, which was deprecated anyway and can be easily
+ simulated with TEMPORARY followed by SELECT IF.
+
+ * select-if.c (cmd_process_if): Removed.
+ (global var process_if_expr) Removed, along with all references
+ globally.
+
Tue Apr 25 13:23:25 2006 Ben Pfaff <blp@gnu.org>
* select-if.c (cmd_process_if): Use SW instead of MW for warning
return CMD_SUCCESS;
}
-\f
-/* Expression on PROCESS IF. */
-struct expression *process_if_expr;
-
-/* Parses the PROCESS IF command. */
-int
-cmd_process_if (void)
-{
- struct expression *e;
-
- e = expr_parse (default_dict, EXPR_BOOLEAN);
- if (!e)
- return CMD_FAILURE;
-
- if (token != '.')
- {
- expr_free (e);
- lex_error (_("expecting end of command"));
- return CMD_FAILURE;
- }
-
- if (process_if_expr)
- {
- msg (SW, _("Only last instance of this command is in effect."));
- expr_free (process_if_expr);
- }
- process_if_expr = e;
-
- return CMD_SUCCESS;
-}
prepare_to_sort_active_file (void)
{
proc_cancel_temporary_transformations ();
- expr_free (process_if_expr);
- process_if_expr = NULL;
}
/* Sorts the active file in-place according to CRITERIA.