Make this possible: SetValue[ ..., If[ InputBox1 == InputBox2, True, False ] ]

Aritmometer shared this idea 11 months ago
Declined

Make this possible: SetValue[ ..., If[ InputBox1 == InputBox2, True, False ] ]

As a number and function variable that is connected to a input box gets the value of the reduced expression and not the unreduced written expression in a input box that is set to Symbolic, a way to check if the content of a input box match another expression could be to make it possible to check if the content of two input boxes that are set to Symbolic are the same.

I will therefore suggest to make this possible: SetValue[ ..., If[ InputBox1 == InputBox2, True, False ] ]

Comments (7)

photo
1

An inputbox just shows some already defined object. So you have to compare these objects and not the inputboxes themselves. And testing if objects are equal hasn't got anything to see with the way they are written. a function f(x)=(x - 1)² is equal to g(x)=x²-2x + 1.You want very specific for some time and you're posting it again and again directly and indirectly in multiple posts. Perhaps you should be clear and not seemingly ask different questions again and again.

photo
1

I was asking in a attempt to find a solution to what I would like GeoGebra to do.

Of cause in most situations you’re right in relation to check if an input is correct.

photo
photo
1

and in addition

a==b

represents a boolean value (true,false), it is quite redundant to put a If clause around it

photo
1

As hawe says, you can just do

SetValue(a, InputBox1 == InputBox2)

photo
1

I have tried that and also by using an if-command.

I haven’t been able to make it work.

GeoGebra doesn’t show any error message, but the value of the boolean variable doesn’t change.

photo
1

I use GeoGebra 5 Classic version 609 from October the 6.

photo
1

Please post your .ggb file

photo
© 2021 International GeoGebra Institute