Basic scripting syntax

BeanShell code is composed of statements, code blocks, function definitions and comments. Some of these elements are nested within each other in various combinations. For example, code blocks are enclosed with brace symbols ( { and } ) and may contain statements, code blocks, comments and sometimes function definitions. Function definitions may contain statements code blocks, comments and function definitions.

Let’s look at these syntactic forms one at a time.