Re: need help regarding compilation

2006-02-23 Thread fidlee
Kent Johnson wrote: > fidlee wrote: > >>Try this: > >> > >>def fac(x): > >> if x<=1:return 1 > >> return x*fac(x-1) > > > > > > I am still getting an error in compilation. Would be really thankful if > > someone could tell me as to what is going wrong. > > Try running the compiler under Java 1.4,

Re: need help regarding compilation

2006-02-23 Thread Kent Johnson
fidlee wrote: >>Try this: >> >>def fac(x): >> if x<=1:return 1 >> return x*fac(x-1) > > > I am still getting an error in compilation. Would be really thankful if > someone could tell me as to what is going wrong. Try running the compiler under Java 1.4, or just run the class in the jython inter

Re: need help regarding compilation

2006-02-23 Thread fidlee
> You really have a book about python that doesn't mention that functions > definitions are closed by a colon? I doubt that... It is not python but jython. But I dont think that the syntax of both of them are different. I managed to download the tutorial of jython from the IBM website. I am wond

Re: need help regarding compilation

2006-02-23 Thread fidlee
> > Try this: > > def fac(x): > if x<=1:return 1 > return x*fac(x-1) I am still getting an error in compilation. Would be really thankful if someone could tell me as to what is going wrong. processing factor Required packages: Creating adapters: Creating .java files: factor module Compili

Re: need help regarding compilation

2006-02-23 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: > i am new to learning jython... And to python, obviously > 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) You need to write 'def fac(x):'. Sybren -- The problem with the world is

Re: need help regarding compilation

2006-02-23 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > 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) You really have a book about python that doesn't mention that functions definitions are closed by a colon? I

Re: need help regarding compilation

2006-02-23 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > 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) This is invalid Python syntax. Have you gone through the Python tutorial yet? Doing so is probably a good

need help regarding compilation

2006-02-23 Thread fidlee
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 F