More than 1 expression in 1 Sequence command

János Losonczi shared this question 3 months ago
Answered

Dear All,

I'd like to put these commands into one Sequence command:

A = Element(list1, 1)
SetPointSize(A, 9)
Rename(A, "B" + "_" + i)
in a way like this:

Sequence({A = Element(list1, i), SetPointSize(A, 9), Rename(A, "B" + "_" + i)}, i, 1, 3)
Unfortunately it doesn't work.

Is it possible to put more than 1 expression into 1 Sequence command?

Best regards,

JL

Comments (3)

photo
1

I think you mean something as in the attachment.

Generate and execute many script commands for each element in a list by using

Flatten(Sequence(<{many script commands for Element(list1,n)}>,n,1,Length(list1)))

alternative to Flatten (all Level): Join() for one level of nested lists

Check the script in the buttons and see also

https://wiki.geogebra.org/en/Execute_Command

https://wiki.geogebra.org/e...

photo
1

more clear what (english) script commands are generated (in scriptList as text-elements)

photo
1

Your answer is very useful.

You may close this topic.


Thank you.

JL.

© 2019 International GeoGebra Institute