Properties
Category
Uncategorized
Similar Topics
Statistics
Comments
5
Participants
4
Subscribers
27
Votes
1
Views
761
Share
Answered
Existe un comando para buscar en una lista,
Necesito algo de la siguiente forma
lExiste=Search nValor in (100, 200, 300,...)
en donde lExiste sera False o True, dependiendo de si esta en la lista el elemento bucado
- GeoGebra
- Help
- Partners
-
Contact us
- Feedback & Questions
- This email address is being protected from spambots. You need JavaScript enabled to view it.
- +43 677 6137 2693
© 2023 International GeoGebra Institute
I'm quite sure that there's a better solution than mine :)
But this is my idea:
- Create a list L containing the values that trigger the boolean value
- Create an input box linked to a value b, that contains the value to search in the list
- Create a boolean a defined as If(Length(KeepIf(x ≟ b, L_1)) ≟ 1, true)
Have a look at the attached worksheet, that contains what I wrote above.
Less cumbersome solutions are welcome :)
My other idea was to use IsDefined() command, but I've not found somethig easier than my previous attempt.
tks, it Works......SO GOOD
si solo quieres saber si está o no en la lista y no necesitas la posicion puedes usar el simbolo pertenece que esta en la tabla que se expande en la alfa que está a a derecha de la barra de entrada
te puede ser util si alguien tiene que aprender la simbologia
tambien debes acostumbrarte a usar indexof() que te dirá la posicion del elemento en la lista
mira también para que vayas adquiriendo recursos como seleccionar en propiedades de una lista el que sea una lista desplegable, para esas se usa elementoelegido() e indiceelegido() (cuánto me cuesta saberlo en español)
Un' altra possibilità:
lExiste= nValor ∈ (100, 200, 300,...)
.
vedere anche
https://wiki.geogebra.org/i...
Comments have been locked on this page!