use "clear -all" instead of "clear all" when running under Octave

issue#70
Michel Juillard 2011-11-20 14:48:01 +01:00
parent da0d2ab8ef
commit 805d01c785
1 changed files with 7 additions and 1 deletions

View File

@ -442,7 +442,13 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool console,
<< "% from model file (.mod)" << endl << endl;
if (clear_all)
mOutputFile << "clear all" << endl;
{
mOutputFile << "if exist('OCTAVE_VERSION')" << endl
<< " clear -all" << endl
<< "else" << endl
<< " clear all" << endl
<< "end" << endl;
}
mOutputFile << "tic;" << endl
<< "global M_ oo_ options_ ys0_ ex0_" << endl