电子表格程序设计中嵌套IF公式的替换技巧
The Lookup Technique to Replace Nested-IF Formulas in Spreadsheet Programming
摘要:
电子表格程序员经常使用嵌套IF公式来实现偶然逻辑,尽管这种技术很难测试和审计,并且被认为是有风险的。我们解释了传统的计算机编程的背景下,在电子表格中的偶然逻辑的编程。我们调查的“查找技术”作为替代嵌套IF公式,描述其测试和审计的好处,并定义其局限性。查找技术采用四个不同的原则:1)使逻辑测试可见; 2)使结果可见; 3)使逻辑结构可见;以及4)用单函数查找公式替换多函数嵌套IF公式。它只能用于某些简单的偶然逻辑。我们描述了如何在更复杂的情况下,可以应用的原则,并提出进一步研究的途径。
英文摘要:
Spreadsheet programmers often implement contingent logic using a nested-IF formula even though this technique is difficult to test and audit and is believed to be risky. We interpret the programming of contingent logic in spreadsheets in the context of traditional computer programming. We investigate the "lookup technique" as an alternative to nested-IF formulas, describe its benefits for testing and auditing, and define its limitations. The lookup technique employs four distinct principles: 1) make logical tests visible; 2) make outcomes visible; 3) make logical structure visible; and 4) replace a multi-function nested-IF formula with a single-function lookup formula. It can be used only for certain simple contingent logic. We describe how the principles can be applied in more complex situations, and suggest avenues for further research.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。