extended documentation for scalar example

Extended documentation of the scalar example.