Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exception Originating from main.lib
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.

Could you have been doing something like this?

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
It was along those lines, yes. In my cond, I had my return integer in parenthesis as a function rather than without.


Forum Jump:

Users browsing this thread: 1 Guest(s)