diff --git a/ComputingTasks.cc b/ComputingTasks.cc index f08af505..3b60d79e 100644 --- a/ComputingTasks.cc +++ b/ComputingTasks.cc @@ -1047,5 +1047,8 @@ void PlotConditionalForecastStatement::writeOutput(ostream &output, const string &basename) const { symbol_list.writeOutput("var_list_", output); - output << "plot_icforecast(var_list_);" << endl; + if (periods == -1) + output << "plot_icforecast(var_list_);" << endl; + else + output << "plot_icforecast(var_list_, " << periods << ");" << endl; } diff --git a/ComputingTasks.hh b/ComputingTasks.hh index 1ba0f707..8529acd2 100644 --- a/ComputingTasks.hh +++ b/ComputingTasks.hh @@ -481,7 +481,7 @@ public: class PlotConditionalForecastStatement : public Statement { private: - //! A value of -1 indicates that the length of the constrained path should be used + //! A value of -1 indicates that the user didn't specify a value const int periods; const SymbolList symbol_list; public: