numere-org / NumeRe

Framework for numerical computations, data analysis and visualisation
https://www.numere.org
GNU General Public License v3.0
20 stars 7 forks source link

Problems using string methods as condition #89

Closed numeredev closed 1 year ago

numeredev commented 1 year ago

DESCRIPTION

Describe the bug Using a stirng method for a if condition yields to problems, especially using if (strvar.fnd(",")). The problem might be related to the comma in the string expression.

To Reproduce Steps to reproduce the behavior:

  1. Reproduce a code like in the screenshot
  2. Execute the code
  3. See error

Expected behavior The code is executed without problems

Screenshots grafik

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

(Do not write below this line)


DEVS' SECTION

ANALYSIS

The Problem originates from a missing condition in value_type* FlowCtrl::evalHeader(int& nNum, std::string& sHeadExpression, bool bIsForHead, int nth_Cmd, const std::string& sHeadCommand), where the CALCTYPE_NUMERICAL is assigned always even if other previous evaluations are necessary (compare that with int FlowCtrl::compile(std::string sLine, int nthCmd))

IMPLEMENTATION STEPS

(see also our Wiki for implementation guidelines)

DOCUMENTATION STEPS

(see also our Wiki for further information)

PULL REQUEST