help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error() [was Re: wavread problems]


From: Robert A. Macy
Subject: Re: error() [was Re: wavread problems]
Date: Wed, 11 May 2005 15:35:58 -0700

forgot to put in the right parenthesis...
>   error("wrong form, dolt\n";

  error("wrong form, dolt\n");

sorry, it's in my programs, just not here!


On Wed, 11 May 2005 15:27:45 -0700
 "Robert A. Macy" <address@hidden> wrote:
> NOW I see what you mean.  
> 
> I did a test inside a function to make certain the
> argument
> was of a proper form.  All code and operations concerning
> the test were valid octave operations.  
> 
> I used to default print a line after such a test...
> if (argument is stupid)
>   errormsg="wrong form, idiot"
>   return;
> endif
> ...doing this created a single error line and then a
> prompt
> 
> I now do this...
> if (argument is stupid)
>   error("wrong form, dolt\n";
> endif
> ...which prints a nice line too and then a prompt.
> 
> both stop the function at that test and all is well. 
> 
> HOWEVER, when I leave out the \n; the program keeps
> trying
> to execute and spits up later when illegal activities
> start
> to occur.
> 
>             - Robert -
> 



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]