Programming abstractions in C阅读笔记:p179-p180
《Programming Abstractions In C》学习第60天,p179-p180总结。
一、技术总结
1.palindrome(回文)
(1)包含单个字符的字符串(如"a"),或者空字符串(如" ")也是回文。
(2)示例:“level”、"noon"。
2.predicate function
(1)predicate的意思
pre-("forth") + *deik-("show"),“that which is said of subject(关于某个东西的论述)”。也有“vt. to say sth that is true(断言)”之意。
(2) predicate function
Predicate function is function that returen True or False。
(3)示例
// predicate function示例: IsPalindrome()就是一个predicate function
bool IsPalindrome(string str) {
int len;
len = StringLength(str);
if (len <= 1) {
return TRUE;
} else {
return (IthChar(str, 0) == IthChar(str, len - 1)
&& IsPalindrome(SubString(str, 1, len - 2)));
}
}
二、英语总结
1.palindrome是什么意思?
答:palin("back") + drome("a running")。c. a word that reads the same forward and backward(回文)。
2.dentically是什么意思?
答:
(1)identically < identical: adv. in a way that is excatly the way。
(2)identical < identity: adj. exactly the same(完全相同)。
(3)identity: idem-("the same"), used to avoid repetition in writing。u. the fact of being or feeling the same。
(4)identify: regard as the same(识别)。vt. to recognize sth and prove what that thing is。
3.revised是什么意思?
答:
p180,The revised implementation of Palindrome appears in Figure4-4。
(1)revised < revise: adj. changed in someway(经过修改的)。
(2)revise: re-("repitition") + videre("to see"),即“to look at again”,后面逐渐引申为“to look over again with intent to to improve or amend(为了改进或修正而重新审视)”。look over: to quickly examine。
三、参考资料
1. 编程
(1)Eric S.Roberts,《Programming Abstractions in C》:https://book.douban.com/subject/2003414
2. 英语
(1)Etymology Dictionary:https://www.etymonline.com
(2) Cambridage Dictionary:https://dictionary.cambridge.org
欢迎搜索及关注:编程人(a_codists)