Computer Science Canada Help with Rounding |
Author: | Zeppelin [ Fri May 23, 2008 8:15 pm ] | ||
Post subject: | Help with Rounding | ||
For some reason I can't round numbers. I looked in the Turing help file and it seems I'm doing it correctly but I constantly get an error that reads "b is not a procedure and hence cannot be called" I tried the same thing with a number like 1.5 and got the same error. Judging by this code could you tell me what I'm doing wrong (Note it's not done yet so there are a bunch of unused veriables and unfinished code)?
|
Author: | gitoxa [ Fri May 23, 2008 8:18 pm ] | ||||
Post subject: | RE:Help with Rounding | ||||
round, ceil, and floor are functions. Functions return a value. Typing in
is the same as typing in
You have to use the value in some way. Either by assigning it, using it in a decision structure, or even using it in another function. |
Author: | Zeppelin [ Fri May 23, 2008 9:12 pm ] |
Post subject: | Re: Help with Rounding |
Thanks for the help. The program works now. |