+/- is the string or integer?

10+20=30. I make loop with "for each"activity to get the calculated result. Because other are A+B-C=D etc.
First loop , i get 10 and keep it in realvalue(int type) and assign to int_result. Initial value of int_result is 0.
The problem is here, second loop , i get + or - , i convert to int
like convert.toint32(str_sign.ToString) , it return error when run .

The calculation logic is as follow,
1 time loop = 0+10+0
2time loop= 0+10++ =10+
3time loop=10+20=30

Thanks ahead


What is the error?


We cannot convert “+” or “-” to numeric type (like Int32 etc).
Perhaps you should review your algorithm.


hello @Pravin_Patil1 When i debug , it stops here. int_result=int_result+realvalue+convert.toint32(str_sign.ToString)

here is the error message

thank you

Assign “”(Empty) value in default to str_sign variable

Let me know if still face the same issue

Thanks @Pravin_Patil1
This will not solve my case i assume, because the plus(+)or minus(-) from the equation will enter into the str_sign. Let me know the other way.

No issues…It’s just the default value for initialization…

Hi @Pravin_Patil1
i set default value to str_sign variable. the same error occurs.

not in there…In variable panel…there is third column for default values…

1 Like