什么是表驱动方法? [英] What are table-driven methods?

查看:105
本文介绍了什么是表驱动方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是表驱动方法?

比尔·盖茨(Bill Gates)在第二Windows Vista广告在1:05。

As mentioned by Bill Gates in the second Windows Vista commercial at 1:05.

推荐答案


表驱动方法是允许您在表中查找信息的方案,而不是使用逻辑语句(例如,case,if)。在简单的情况下,使用逻辑语句会更快,更容易,但是随着逻辑链变得越来越复杂,表驱动的代码比复杂的逻辑更简单,更易于修改且效率更高。

Table-driven methods are schemes that allow you to look up information in a table rather than using logic statements (i.e. case, if). In simple cases, it's quicker and easier to use logic statements, but as the logic chain becomes more complex, table-driven code is simpler than complicated logic, easier to modify and more efficient.

参考: McConnell ,史蒂夫。代码完整,第二版。雷德蒙德(华盛顿):微软,2004年。印刷。页面411,第1段。

这篇关于什么是表驱动方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆