void CommandLine :: FlushOutput ( )
{

  SystemOutput("",NO,YES);


}
void CommandLine :: ClearOutput ( )
{

  SystemOutput("",YES,YES);


}
Matrix<UsedType> EqdifSim<UsedType>::Simulation(Matrix<UsedType> SystemInput, bool getState)
{
    int SampleLength = SystemInput.getCols();
    Matrix<UsedType> X(this->A.getRows(), SampleLength);
    Matrix<UsedType> SystemOutput(this->C.getRows(), SampleLength);

    for(int i = 1; i <= SampleLength; i++)
    {
        X.setLine(i+1, this->Ad*X.getColumn(i) + this->Bd*SystemInput.getColumn(i));
        SystemOutput = this->Cd*X.getLine(i+1) + this->Dd*SystemInput.getColumn(i);
    }

    if(getState == 0)
        return SystemOutput;
    else
        return X;
}
logical ErrorHandle :: ShowMessage (Error *error_obj )
{
  NString      string;
  logical      term = NO;
  if ( error_obj )
    message.SetData(error_obj);
    
  string.Append(message.component,sizeof(message.component));
  string += ' ';
  string.Append(message.error_type,sizeof(message.error_type));
  string += ' ';
  string.Append(message.error_code,sizeof(message.error_code));
  string += ':';
  string += ' ';
  if ( error_obj )
    string.Append(message.text,sizeof(message.text));
  
  SystemOutput(string,NO,YES);  

  return(term);
}