Chapter 6
Programming

nip2 includes a tiny lazy functional programming language. You can use it to glue VIPS image processing functions together to perform more complicated tasks. All of the nip2 toolkit menus are written in this language.

These first sections just describe the programming language. See §4.4 for a description of the programming window. You use nip2’s programming language to control the user interface: the link between what happens inside a nip2 function and what you see on the screen in covered in §6.12.

 6.1 Load and save
 6.2 Using an external editor
 6.3 Syntax
 6.4 Naming conventions
 6.5 Evaluation
 6.6 Operators
  6.6.1 The real type
  6.6.2 The complex type
  6.6.3 The character type
  6.6.4 The boolean type
  6.6.5 The list type
  6.6.6 The function type
  6.6.7 The image type
 6.7 Lists and recursion
 6.8 Lazy programming
 6.9 Pattern matching
 6.10 The standard libraries
 6.11 Classes
  6.11.1 Parameterised classes
  6.11.2 Inheritance
  6.11.3 Minor class features
 6.12 Controlling the interface
  6.12.1 Tools and toolkits
  6.12.2 Workspaces
  6.12.3 The Image class
  6.12.4 The Colour class
 6.13 The _Object class
 6.14 Optimisation
 6.15 Calling VIPS functions