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)
浙公網安備 33010602011771號