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.