Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Writing Pig Latin scripts is largely about packaging together the Pig Latin statements that you’ve successfully tested in Grunt. Pig scripting does have a few unique topics though. They’re comments, parameter substitution, and multiquery execution.
As you’ll reuse your Pig Latin script, it’s obviously a good idea to leave comments for other people (or yourself) to understand it in the future. Pig Latin supports two forms of comments, single-line and multiline. You start the single-line comment by a double hyphen and the comment ends at the end of the line. You enclose the multiline comment by the /* and */ markers, similar to multiline comments in Java. For example, a Pig Latin script with comments can look like