Re: [julia-users] Re: How to stop program execution at some point

2016-11-11 Thread Angel de Vicente
Nice. Thanks! >> Yes, I was using that, but it is not very clean. It gives the wrong >> impression that an error happened (which in many cases it is probably >> true, but not always) plus it prints the call stack at the point of the >> error. If error() could be told to be silent, it would be almo

Re: [julia-users] Re: How to stop program execution at some point

2016-11-11 Thread Tamas Papp
On Fri, Nov 11 2016, Angel de Vicente wrote: > Tamas Papp writes: >>> But return will only quit the current function and return execution to >>> the caller. Coming from Fortran, I also miss something like STOP, which >>> will stop all execution and return me to the REPL. >> >> I hear you --- I m

Re: [julia-users] Re: How to stop program execution at some point

2016-11-11 Thread Angel de Vicente
Tamas Papp writes: >> But return will only quit the current function and return execution to >> the caller. Coming from Fortran, I also miss something like STOP, which >> will stop all execution and return me to the REPL. > > I hear you --- I miss RETURN-FROM from Common Lisp. > > Simply throwing

Re: [julia-users] Re: How to stop program execution at some point

2016-11-11 Thread Tamas Papp
On Fri, Nov 11 2016, Angel de Vicente wrote: > Tamas Papp writes: > >> return > > But return will only quit the current function and return execution to > the caller. Coming from Fortran, I also miss something like STOP, which > will stop all execution and return me to the REPL. I hear you --- I

Re: [julia-users] Re: How to stop program execution at some point

2016-11-11 Thread Angel de Vicente
Tamas Papp writes: > return But return will only quit the current function and return execution to the caller. Coming from Fortran, I also miss something like STOP, which will stop all execution and return me to the REPL. -- Ángel de Vicente http://www.iac.es/galeria/angelv/

Re: [julia-users] Re: How to stop program execution at some point

2016-11-11 Thread Tamas Papp
return On Fri, Nov 11 2016, Davide wrote: > Actually, when executing a function in Julia REPL, quit() and exit() also > exit from julia. Is there a way to stop the function but not Julia? > >Thanks > > On Monday, November 7, 2016 at 11:40:32 AM UTC+1, Tamas Papp wrote: >> >> See quit(), and

[julia-users] Re: How to stop program execution at some point

2016-11-11 Thread Davide
Actually, when executing a function in Julia REPL, quit() and exit() also exit from julia. Is there a way to stop the function but not Julia? Thanks On Monday, November 7, 2016 at 11:40:32 AM UTC+1, Tamas Papp wrote: > > See quit(), and in general exit(code). >

[julia-users] Re: How to stop program execution at some point

2016-11-07 Thread Fred
Thank you Tamas, quit() is exactly what I searched ;) Le lundi 7 novembre 2016 11:40:32 UTC+1, Tamas Papp a écrit : > > See quit(), and in general exit(code). >

[julia-users] Re: How to stop program execution at some point

2016-11-07 Thread Tamas Papp
See quit(), and in general exit(code). On Monday, November 7, 2016 at 11:21:14 AM UTC+1, Fred wrote: > > Hi, > > I search in Julia the equivalent of Perl > die; > to stop the execution of a program. > > I tried "break" but it produces an error : > ERROR: LoadError: syntax: break or continue outsi

[julia-users] Re: How to stop program execution at some point

2016-11-07 Thread Fred
Yes Michele, "die" is able to stop execution at any point, even outside a loop, this is what I searched and did not found in Julia.

[julia-users] Re: How to stop program execution at some point

2016-11-07 Thread Michele Zaffalon
If I understand correctly and die raises an exception in Perl, then error() is the equivalent in Julia. `break` can only be used inside a loop, for instance when a condition is met: while true cond && break end On Monday, November 7, 2016 at 11:21:14 AM UTC+1, Fred wrote: > > Hi, > > I sea