From a42056323fd1cd8cd11fa84ac034ddf98a34d39f Mon Sep 17 00:00:00 2001 From: Michel Juillard <michel.juillard@mjui.fr> Date: Mon, 21 Nov 2011 15:03:19 +0100 Subject: [PATCH] another work-around for Octave 3.2 bug with "clear all" (cherry picked from commit 2ac0e8901468d3532124c0bcccb41071350a838b) --- preprocessor/ModFile.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/preprocessor/ModFile.cc b/preprocessor/ModFile.cc index 82209665c..f6b409bd1 100644 --- a/preprocessor/ModFile.cc +++ b/preprocessor/ModFile.cc @@ -385,11 +385,9 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool console, if (clear_all) { - mOutputFile << "if exist('OCTAVE_VERSION')" << endl - << " clear -all" << endl - << "else" << endl - << " clear all" << endl - << "end" << endl; + mOutputFile << "clear all" << endl + // this is a work-around for a bug in Octave 3.2 + << "clear globals" << endl; } mOutputFile << "tic;" << endl -- GitLab