[Top][All Lists]

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

eval and suppressed output

From: John W. Eaton
Subject: eval and suppressed output
Date: Tue, 18 Aug 1998 22:24:32 -0500 (CDT)

On 18-Aug-1998, David D. Clark <address@hidden> wrote:

| I have a matrix of data, (mxn)[], which I want to reference with a name
| stored in a string, stringname="stringvalue", and store the value of the
| matrix in a regular variable called data.
| data=eval(stringname)
| I want to suppress all output of this operation.  Putting a semicolon at
| the end of the entire statement suppresses the output data=(mxn)[], but the
| output stringvalue=(mxn)[] is not suppressed.  Putting a semicolon after
| stringname results in a parse error.
| octave> data=eval(stringname;);
| parse error:
| >>> data=eval(stringname;);
|                         ^
| Could somebody please point me in the right direction for suppressing all
| output of this statement.

Put a semicolon at the end of the string itself:

  data = eval ("x = 1;");

or set the built-in variable `default_eval_print_flag' to 0.


reply via email to

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