Testing a World Next

The following are simple functions that can be asked of a tile, called "tilename", in the selected world:

Square(tilename)
Triangle(tilename)
Circle(tilename)
Small(tilename)
Medium(tilename)
Large(tilename)

Select the world Four Squares from the dropdown box. Enter the following sentence into the box below the grid:

Square(a)

Now press the "Evaluate" button to the right of the "Print" button (you may have to scroll right to see the "Evaluate" button). You should see the result True under the box below the grid.

Now enter this sentence. It should also produce a true result.

Large(b)

The boolean operators and, or and not can be used to specify multiple tests, as in the following:

Square(a) and Large(b)
Square(a) or Triangle(a)
not Small(b)
Square(a) and not Large(a)

Parentheses can be used to specify precedence. The expressions in parentheses are evaluated first. The following sentences both produce different results:

Circle(b) and Circle(a) or Square(a)
Circle(b) and (Circle(a) or Square(a))

Comparing Tiles
Index