<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Op 21-2-2012 20:51, Stephen Bloch schreef:
<blockquote
cite="mid:C462650F-784E-463B-B671-61FF7B1BCDC9@adelphi.edu"
type="cite">
<pre wrap="">
On Feb 21, 2012, at 2:43 PM, Roelof Wobben wrote:
</pre>
<blockquote type="cite">
<pre wrap="">But now I get this error message :
unsaved editor>:27:23: function call: expected a function after the open parenthesis, but found a part in: (tarief1 amount)
When I do (tarief 1 amount) instead of ((tarief amount))
</pre>
</blockquote>
<pre wrap="">
Yes, that's where the syntax error is. So you've fixed that.</pre>
</blockquote>
<br>
I fixed that? I always thought that if I use another function that
I must be into ().<br>
So In my opinion one () for the then part and one () for the
function call. <br>
<br>
<br>
<blockquote
cite="mid:C462650F-784E-463B-B671-61FF7B1BCDC9@adelphi.edu"
type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">I don't get the error message but the outcome of (payback 2600) is not right.
</pre>
</blockquote>
<pre wrap="">
Several questions:
1) Have you written a complete set of test cases, with right answers, using "check-expect"? Since there are four categories of input for this problem, you need at least four test cases, and you should probably have three more for the boundaries, a total of seven test cases.
</pre>
</blockquote>
<br>
Nope, check-expect is not explained on chapter section 3 of the book
how to design programms. So I did not use that function. I can make
test-cases but then in this form <br>
<br>
(<span class="builtin">=</span> (<i>tarief 495</i><span
class="selfeval"></span>) 1,2375) <br>
<br>
<span class="selfeval"></span>
2) Which of these test cases produced wrong answers, and which (if
any) produced right answers? You can use the pattern of right and
wrong answers to track down where the problem is.
<br>
<br>
See answer1 <br>
<br>
<br>
3) Have you used the Stepper to watch what your program is doing?
<br>
<br>
Yes, when I do (payback 2600) on the prompt and press Step I only
see a message All definitions have been sucessfully evaluated and
not other outcome so that did not help me any further. <br>
<br>
<br>
<br>
<br>
<br>
Stephen Bloch
<a class="moz-txt-link-abbreviated" href="mailto:sbloch@adelphi.edu">sbloch@adelphi.edu</a>
<blockquote
cite="mid:C462650F-784E-463B-B671-61FF7B1BCDC9@adelphi.edu"
type="cite">
</blockquote>
<br>
</body>
</html>