2012年5月12日
摘要: Section 7.1 Defining a FunctionA function is uniquely represented by a name by a name and a set of operand types. Its operands, referred to as parameters, are specified in a comma-separated list enclosed in parentheses.The actions that the function performs are specified in a block, referred to as t 阅读全文
posted @ 2012-05-12 16:55 Ken.Dred 阅读(1190) 评论(0) 推荐(0)
摘要: Exercise 7.1:What is the difference between a parameter and an argument?The parameters of a function provide named, local storage for use by the function.An argument is an expression, it might be a variable, a literal constant or an expression involving one or more operators.Exercise 7.2: Indicate w 阅读全文
posted @ 2012-05-12 16:54 Ken.Dred 阅读(316) 评论(0) 推荐(0)
2012年5月9日
摘要: Exercise 6.1: What is a null statement? Give an example of when you might use a null statement.A single semicolon.For example, we might want to read an input stream, ignoring everything we read until encounter a particular value: // read until we hit end-of-file or find an input equal to sought. ... 阅读全文
posted @ 2012-05-09 00:29 Ken.Dred 阅读(315) 评论(0) 推荐(0)
2012年5月3日
摘要: Section 6.1 Simple StatementsNull StatementsThe simplest form of statements is the empty, or null statement. It takes the following form (a single semicolon): ; // null statementA null statement is usefull where the language requires a statement but the program's logic does not. Such usag... 阅读全文
posted @ 2012-05-03 15:00 Ken.Dred 阅读(362) 评论(0) 推荐(0)
2012年4月29日
摘要: Section 5.1 ArithmeticOperatorsFor both division (/) and modulus (%), when both operands are postive or negative, the result is positive (or zero), the modulus of negatives is negative (or zero). If only one operand is negative, then the result of modulus is machine-dependent for both operators.Exer 阅读全文
posted @ 2012-04-29 16:17 Ken.Dred 阅读(316) 评论(0) 推荐(0)
点击右上角即可分享
微信分享提示