Skip to content

Commit 7b4ab9b

Browse files
Merge pull request #409 from mattgarner/groovy_example_correction
Correction for groovy If statement snippet
2 parents 2e1b6c0 + 70f3a96 commit 7b4ab9b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docs/basic_training/groovy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ else {
371371
The `else` branch is optional. Also, the curly brackets are optional when the branch defines just a single statement.
372372

373373
```groovy linenums="1" title="snippet.nf"
374-
x = 1
374+
x = 11
375375
if (x > 10)
376376
println 'Hello'
377377
```

docs/basic_training/groovy.pt.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,15 @@ else {
254254
O ramo `else` é opcional. Além disso, as chaves são opcionais quando a ramificação define apenas uma única instrução.
255255

256256
```groovy linenums="1"
257-
x = 1
257+
x = 11
258258
if (x > 10)
259259
println 'Olá'
260260
```
261261

262+
```console title="Output"
263+
Olá
264+
```
265+
262266
!!! tip
263267

264268
`null`, strings vazias e coleções (mapas e listas) vazias são avaliadas como `false`.

0 commit comments

Comments
 (0)