help-octave
[Top][All Lists]
Advanced

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

Re: misbehavior in Octave 2.9.4 for OS/2


From: Dushan Mitrovich
Subject: Re: misbehavior in Octave 2.9.4 for OS/2
Date: Fri, 16 Jun 2006 22:20:19 -0700
User-agent: VSoup v1.2.9.48Beta [OS/2]

"Steven Levine" <address@hidden> wrote:
>In <address@hidden>, on 06/16/06
>   at 01:46 PM, address@hidden (Dushan Mitrovich) said:
>
>> Yes, that's because I found that if I end all assignment lines with semi-
>> colons, when I call the function no results are printed.  When I remove
>> the semicolons from the result lines, Octave does print the result.  Is
>> this not the expected behavior?
>
> I depends on what your needs are.  There are exceptions, but generally,
> it is better to suppress internal results.
> 
> One would define the function as
> 
>   o = function f(i)
>      o = ...;
>   endfunction
> 
> and invoke the function as
> 
>   f(3)
> 
> or as
> 
>   f(3);
> 
> so that the output is controlled by the calling function.

Thanks, Steven, that makes sense.  I'll use that approach.

- Dushan



reply via email to

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