i am new to learning jython...

i just tried compiling a small piece of code that is given below:

def fac(x)
 if x<=1:return 1
 return x*fac(x-1)

on

C:\Program Files\jython\temp>jythonc factor.py

it showed the following error:

processing factor
Traceback (innermost last):
  File "C:\Program Files\jython\Tools\jythonc\jythonc.py", line 5, in ?
  File "C:\Program Files\jython\Tools\jythonc\main.py", line 298, in
main
  File "C:\Program Files\jython\Tools\jythonc\main.py", line 219, in
doCompile
  File "C:\Program Files\jython\Tools\jythonc\compile.py", line 195, in
compilef
ile
  File "C:\Program Files\jython\Tools\jythonc\compile.py", line 209, in
compile
  File "C:\Program Files\jython\Tools\jythonc\SrcGenCompiler.py", line
1079, in
execstring
  File "<string>", line 1
        def fac(x)
                  ^
SyntaxError: invalid syntax





What may have gone wrong?
I am totally clueless as it is not mentioned in any of the books that I
tried.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to