Linux/Apache/PHP+MySQL/Smarty/JQuery/RubyOnRails
分享 Linux/Apache/PHP+MySQL/Smarty/JQuery/RubyOnRails 的點點滴滴!
2018年11月14日 星期三
程式易讀-笛摩根定律
1) not (a or b or c) => (not a) and (not b) and (not c)
2) not (a and b and c) => (not a) or (not b) or (not c)
Example:
if ( !(file_exists && !is_protected)) { ... } => if ( !file_exists or is_protected) { ... }
沒有留言:
張貼留言
‹
›
首頁
查看網路版
沒有留言:
張貼留言