[Script] Comment exécuter plusieurs actions à la fois quand une condition est remplie

Neogramme shared this question 3 years ago
Answered

Bonsoir, j'aimerai exécuter plusieurs actions à la fois quand une condition est remplie.

Je m'explique, j'ai un script qui ressemble à ça :

Condition a : x(A)² + y(A)² ≥ 1

1. Si[a == true, SoitValeur[X, x(B)]]
2. Si[a == true, SoitValeur[Y, y(B)]]

Le problème c'est qu'il arrive que la première exécution modifie la condition initial, et j'aimerai qu'il exécute les deux à la suite sans qu'il ait à revérifier la condition à chaque fois.

Un truc comme ça : Si a = vrai, Alors X = x(B) et Y = y(B)

Comments (4)

photo
1

Bonsoir,

avec la commande Exécute ?


https://wiki.geogebra.org/f...

photo
1

Merci,

je viens de tester et ça marche à merveille.

photo
photo
1

also possible M point

X=x(M)

Y=y(M)


and in the script

Si[a == true, SoitValeur[M, B]]

photo
1

Si[a, SoitValeur[M, B]]

is shorter than

Si[a == true, SoitValeur[M, B]]

© 2023 International GeoGebra Institute