Computer Science Canada help with palindrome question |
Author: | JR [ Mon Apr 19, 2004 4:12 pm ] | ||
Post subject: | help with palindrome question | ||
this is the code, i need to make the program find the palindrome using recustion. I need help fixin the prog, some strange errors. |
Author: | AsianSensation [ Mon Apr 19, 2004 4:18 pm ] |
Post subject: | |
well, right now you are calling a function like a procedure, you can't do that. Another error, is that when you are passing the string as a parameter, if the string you pass is 1 character long, passing s (2 .. * - 1) will give you error. that's about it, from what I see |
Author: | EDEN-E [ Mon Apr 19, 2004 4:41 pm ] | ||
Post subject: | |||
hmm... when you use function, you have to return the result. |
Author: | Tony [ Mon Apr 19, 2004 6:05 pm ] | ||
Post subject: | |||
if a function returns boolean, you don't need to use comparison operator in if statement ![]()
|