nus-cs2113-AY2324S2 / pe-dev-response

0 stars 0 forks source link

Negative Number is Recognized As Flag #797

Open nus-pe-bot opened 4 months ago

nus-pe-bot commented 4 months ago

When trying to view a medication with a negative quantity, the error printed is shown below.

Screenshot 2024-04-19 164135.png

Although -10 is not a flag but rather a negative integer, hence the error message should be "Medicine cannot be found".


[original: nus-cs2113-AY2324S2/pe-interim#935] [original labels: severity.Low type.FunctionalityBug]

royaliceblue commented 4 months ago

Team's Response

Dear Sir/Madam,

Thank you for pointing out this issue and the severity is also right. Indeed it needs to be emphasized more in depth in the guide to avoid further confusion.

Our program works by parsing all the argument flags and perform its respective functionality, where in this case is to view -q -10 will not be parsed correctly as stated in the guide that "flag (which is of the form -*".

I hope this answers your query.

Thank you.

Regards, Eric

Duplicate status (if any):

--