On 11/16/2019 1:14 PM, Ben Pfaff wrote: >> too_many_errors = true; >> if (m->severity == MSG_S_WARNING) >> submit_note (xasprintf (_("Warnings (%d) exceed limit (%d). >> Syntax processing will be halted."), >> n_msgs, max_msgs)); >> else >> submit_note (xasprintf (_("Errors (%d) exceed limit (%d). >> Syntax processing will be halted."), >> n_msgs, max_msgs)); >> } >> } >> } >> >> >> I don't understand this code: >> >> if (m->severity == MSG_S_WARNING) >> n_msgs += counts[MSG_S_ERROR]; >> >> >> Why would a warning increase n_msgs by some count of errors? > I'm sure it's because I read in some earlier version of the SPSS > documentation that errors contribute toward the warning count for this > purpose. It looks like this is no longer the case though.
Upon reflection, a few other things occur to me. Those log messages may be misleading. I could get n-1 warnings and then 1 error and have processing stop with the message about errors, or vice-versa. Not a big deal, because this probably arises rarely. Also, how are message translations handled in PSPP? I see emails about "New Hungarian PO file for 'pspp' (version 1.2.0)" and I had the impression that all the user strings were extracted to a file (which is then translated) and, I assumed, referenced indirectly. Is it a problem that the source shows a specific (English-language) string? And finally, if PSPP handled errors and warnings independently (and SPSS in batch mode did not), would that break anything? Do you think anyone is using PSPP in a way where halting is a feature? Like in a batch mode where if the syntax processed, then they do not check for warnings/errors? I think halting on potentially innocuous data problems is a far greater issue? I routinely read in test data and I might have hundreds of variables and hundreds of people. If the system that exports the data uses an odd symbol for missing (I have a client who outputs tab-delimited files with comma used as a missing data value) I might easily get hundreds of warnings about character data found where a numeric value was expected. I agree with Frans: Turning off warnings is a lot less useful than having PSPP show some warnings, suppress the rest but continue processing. -Alan -- Alan D. Mead, Ph.D. President, Talent Algorithms Inc. science + technology = better workers http://www.alanmead.org "A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, and die gallantly. Specialization is for insects." -- Robert A. Heinlein