Skip to content

Commit 3bb2cf5

Browse files
Merge pull request #153 from stan-dev/generated-quantities
Clarify what gets printed in the generated quantities block
2 parents cec0e8f + a0bc35a commit 3bb2cf5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/reference-manual/blocks.Rmd

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,4 +565,14 @@ After the generated quantities statements are executed, the constraints
565565
on the declared generated quantity variables are validated.
566566

567567
All variables declared as generated quantities are printed as part of
568-
the output.
568+
the output. Variables declared in nested blocks are local variables,
569+
not generated quantities, and thus won't be printed. For example:
570+
```stan
571+
generated quantities {
572+
int a; // added to the output
573+
574+
{
575+
int b; // not added to the output
576+
}
577+
}
578+
```

0 commit comments

Comments
 (0)