Anonymous user
Runtime evaluation: Difference between revisions
→GString embedded values
Line 72:
====GString embedded values====
<lang groovy>def startYear = 2008
def endYear = 2121
Line 84:
The variables "startYear" and "endYear" are dynamically pulled into the script '''GString''' as embedded values.
Notice that in the script the embedded value "${it}" must be ''quoted'' with backslash (\) to prevent parsing as a part of the script '''GString'''. However, it is still correctly parsed within the internal '''GString''' when the script is run.
====Binding variables====
|