sallam-ahmed / Polynomial-Calculator

Data Structure 2015 Course Project
Apache License 2.0
0 stars 3 forks source link

Coefficient 1 Input Bug #17

Closed sallam-ahmed closed 8 years ago

sallam-ahmed commented 8 years ago

If the input coefficient is NULL hence meaning 1: 1x^2 == x^2

if x is written in lower case bug arises: image

if X in uppercase it's parsed: image

khaledkee commented 8 years ago

I think this is the problem, MainForm.cs line 517-516:

if (expr.StartsWith("X"))
                expr = "1" + expr;

There is no similar condition for the lower case. Also see line 514 and 515.