Runtime evaluation: Difference between revisions

m
m (Added Sidef language)
Line 395:
'''Binding''' variables<br>
'''GroovyShell''' uses a '''Binding''' object to pass variable values to a script. This is the only way to pass variables if the script comes from a '''File''' or '''InputStream''', but even if the script is a string '''Binding''' avoids the nested quoting issue caused by the ''ad hoc'' use of '''GString'''.
<lang groovy>def context = new B indingBinding()
context.startYear = 2008
context.endYear = 2121
Anonymous user