It looks like you're new here. If you want to get involved, click one of these buttons!

I am making an algebric calculator but at this moment the main thing I would like to make before finishing it is to find a way of changing the values of the variables during the simulation, and i cant do it with parameters (nor iparameters), I always get an error saying it cant perform arithmetics on the value. Help please?

Tagged:

## Comments

Please paste your code, then we might be able to help you.

what i want is a way to change A,B and C while in the simulation, parameters dont work whenever i try it says the parameter is a nil value.

I tried using:

and

This works, don't know if it helps...

Thank You! It is just what I wanted! :-D

There is a way of not selecting decimals on the parameters? Because it is quite annoying

Maybe you could make a

At the end of the calc function to snap it to the integers or so?

I got 2 problems: when i put math.round at the end of function calc() it says "= expected

near end" and i got multiple calculations in this program, and in the biquadratic equation class it dont recognizes x1. Here is the whole thing:

(im Brazilian BTW so biquadrada = biquadratic)

@PLPP math.round is a function, so you have to give it a number as a parameter. For example:

There is also math.floor (always round down) and math.ceil (always round up).

No such luck

You are not using the result of

`math.floor( A )`

E.g.

I'm happy to see that there is a "round" function in the "math" library, because I wasn't able to find it in the manual. Perhaps it should be there...

I didn't know there was one. I have been spinning my own.

I guess I can stop using that code.

Still not working...

I'm pretty sure there isn't a math.round in Codea - however @Vega's solution works fine.

Ah you're right, @Reefwing. I just assumed it was there.