Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exception Originating from main.lib
#1
Exclamation 
Hey all,

I'm having some issues running scam. When I attempt to run, I receive this error:
EXCEPTION: nonFunction
file main.lib,line 5: attempted to call symbol #t as a function

This was working last night. I tried the new version that was posted recently as well with no luck. Looking at the file, the symbol #t isn't even on that line. Any suggestions as to where I went wrong would be greatly appreciated.

Thanks.
Reply
#2
Could you have been doing something like this?

Code:
scam> (else)
EXCEPTION: nonFunction
file main.lib,line 98: attempted to call symbol #t as a function

In a cond, an else should be used this way:

(else (iter (+ a b) (- n 1)))

The else variable is bound to true by default. Also, you can call scam with the -t N option to get more tracing feed back, as in:

scam -t 3 task1.scm
Reply
#3
It was along those lines, yes. In my cond, I had my return integer in parenthesis as a function rather than without.

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)