OpenSearch/docs/painless/painless-lang-spec/painless-statements.asciidoc

14 lines
416 B
Plaintext
Raw Normal View History

[[painless-statements]]
=== Statements
Painless supports all of Java's https://docs.oracle.com/javase/tutorial/java/nutsandbolts/flow.html[
control flow statements] except the `switch` statement.
Painless also supports the `for in` syntax from Groovy:
[source,painless]
---------------------------------------------------------
for (item : list) {
...
}
---------------------------------------------------------