[Top][All Lists]

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

Re: error in documentation ?

From: Rob Mahurin
Subject: Re: error in documentation ?
Date: Sat, 21 Mar 2009 14:26:13 -0400

On Mar 21, 2009, at 1:15 PM, Alain Baeckeroot wrote:

Dear all

I think there is an arror in documentation, wrt 'system' function :
 GNU Octave, version 3.0.1
 Octave was configured for "i486-pc-linux-gnu".    says :
[output, status] = system ("echo foo; exit 2");

That looks like documentation to a very old version of Octave.
or "help" from the prompt.

But it seems the order is the opposite:
octave:20> [output, status] = system ("echo foo; exit 2")
output =  2
status = foo

This is annoying as one cannot get directly the output.

octave:7> function output = mysystem(string); [status, output] = system(string); endfunction
octave:8> mysystem("echo foo; exit 2")
ans = foo

Does that do what you wanted?


Rob Mahurin
Department of Physics and Astronomy
University of Tennessee                 865 207 2594
Knoxville, TN 37996                     address@hidden

reply via email to

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