The Formula Language

We have tried to keep the syntax and semantics of the formula language as close as possible to that adopted by most spreadsheets. The formula language specification for the LIS, in EBNF notation, is shown in the appendix. The only significant variation from standard is that the LIS formulae may contain a widget value.

Image processing functions are regarded as part of an expression and are represented by the function name followed by its bracketed arguments. This format is already used in most spreadsheets for mathematical functions such as sum. The figure below shows some of the image processing functions available to the LIS user.

We did not implement the full grammar for the LIS. Widgets, cell references and absolute addressing were not implemented; this was mainly due to time limitations.

Syntax Semantics
=LOAD(imageFileNam) Load the image value into the current cell and display the image as a thumbnail within the cell.
=ROTATE(cellName;integer) Rotate the image in the referenced cell by the given number of degrees and display in the current cell.
=TRANSLATE(x-shift;y-shift;wrap) Shifts the image in the cell by the x and y shift values with the option to wrap the altered image.

Here is a simple example of a spreadsheet, with a small dependency chain.

A1: =LOAD(flower)
A2: =ROTATE(A1;90)

This causes an image file called 'flower' to be loaded from th current directory. The image is then shown, scaled to fit, in cell A1. Cell A2 now uses the rotate command. One of the arguments to this command is the cell name of another cell reference. Thus cells A1 and A2 are chained together and any change to the value of cell A1 will cause A2 to be reevaluated.