help-octave
[Top][All Lists]
Advanced

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

Re: User input combined, error "input: reading user-input failed!"


From: Michael Goffioul
Subject: Re: User input combined, error "input: reading user-input failed!"
Date: Wed, 26 Dec 2012 09:18:01 -0500

On Wed, Dec 26, 2012 at 8:40 AM, hkhauke <address@hidden> wrote:
Hi again,

I found out a little more details about the unexpected error as described in
my previous mail:

It is not the mexPrintf command that causes the problem. Instead, I have
identified that it is a
call to my own parser function "yyparse();" in the C-code of the Mex file
which is based on
the flex and bison tools.

If I put this command (yyparse()) into comments in my mex-file C-Code, the
Octave interpreter
stops on the "input('...','s');" command in the Matlab code after the Mex
file is called.
Then, I can specify my selection.

If I DO NOT put "yyparse();" in comments, the "input('..', 's');" line is
ignored for the first time and it
leads to the error message "input: reading user-input failed!" for the
second time the "input('..', 's')"
command is used.

My guess is: The Octave interpreter also uses flex and bison somehow, and
since it is C with global
variables, I corrupt these variables by writing to what I expected to be my
own private variables.

Yes, octave uses bison and flex. I'm not an expert in those tools, but AFAIK you can specify a namespace/prefix to avoid such collision. I think octave is using the prefix "octave_".

Michael.


reply via email to

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