#Calculator/Comparison Operators

15 messages · Page 1 of 1 (latest)

near radish
#

I continuously have been getting the same error over and over again for this code and I have basically been banging my head against the wall trying to solve it.

The image shows all the files combined and the error I get is from the 5th line onwards which is the beginning of expressions2.txt

I keep getting this error:

    at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842)
    at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
    at java.base/java.lang.Double.parseDouble(Double.java:543)
    at Complex.fromString(Main.java:94)
    at Main.evaluateExpression(Main.java:47)
    at Main.processFile(Main.java:20)
    at Main.main(Main.java:9)

when I compile and whatever I do to change it it just doesn't work.

The darker image is a screenshot of what happens when I attempt to run the code.

coarse shoreBOT
#

This post has been reserved for your question.

Hey @near radish! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

near radish
#

ok

#

So

#

I got the code to change to this

#

but now i can even get any of the expressions to work

grizzled swallow
#

There is totally someone who's going to check what it is you changed

near radish
grizzled swallow
#

I take it for granted that this "here is how I know none of the expressions work" screenshot isn't in response to my latest remark

#

I don't have time to study long codes at the moment, nor would I have been willing to account for two different source codes that you don't even tell what changes between each.

But usually when you run into that kind of issues, to try and figure out what's happening, you're supposed to be debugging your program as it runs, rather than behave as if it is an utmost impossibility to check what is the program's memory content before it gives its final results.

near radish
#

I figured it out

coarse shoreBOT
# near radish Thanks for your advice

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.