# disappearing formulas

mnh002 shared this question 2 months ago

Hi, I'm using Geogebra 6.0.590.0-offline (17 June 2020) on a Windows laptop with Windows 7.

Certain lines of code keep disappearing. (I'm a newbie so probably lack of knowledge).

Specifically here's what I type in:

A = (3.3)

n = 7 * 13

b = floor(sqrt(n))

c = slider(3, b, 2)

d = Mod(n, c)

if(d == 0, SetCaption(A, text(c))

It's this last line that keeps disappearing every time I hit Enter. If I change it to

if(d == 0, Circle(A, 1))

instead it works fine - puts a circle around A whenever the slider hits 7. So why doesn't the line to set the caption to something different work? TIA

1

```Certain lines of code keep disappearing.
```

SetCaption() is a scripting command (ie disappears after one use) so that's expected.

Please explain what you are trying to do then we can let you know the best way

1

Well, I'm just playing around trying to learn the program. My first attempt. I just thought I'd try to make

a 'visual' factoring program. Input a number, set the slider going and when it gets to a factor it would

somehow display the value of the slider and stop. (I don't have the slider stop part figured out either).

Not knowing how to display the solution I thought maybe setting the caption of a point to the solution

would work but alas...

1

If your slider is a then you can put a boolean expression into Condition to Show Object for a text object like

```a==3
```
https://wiki.geogebra.org/e...

1

Ah yes, I see how that works. Is there also a way to have the slider automatically stop when reaching the point where the boolean is triggered? OR, alternatively, have the value of the trigger point displayed somehow where it does not vanish once the slider is past the trigger?