2011

Table Of Contents
No explicit type casting or type conversion is supported. However, many
mixed-type assignment operators and functions are provided.
If a variable of image type is used where type rules would require a color type,
the language automatically calls the built-in single-argument sample (image)
function. This is provided as a convenience.
As PXL has no Boolean type, the float type is used to represent Boolean values.
Any value that is different from 0.0. PXL Boolean operators return 1.0 as a
true value.
Qualifiers
A variable can be defined as const. In this case, the variable cannot be modified
after his initialization. An error will be issued if a const variable is modified
after initialization.
As previously described, function arguments can be qualified as input or
output. These are currently only used by the PXL tool to pass in data to the
main() function and read out the output pixel value. The initial value of an
output argument is undefined.
Comments
Comments use the same syntax as C. Two consecutive slashes (// Comment)
are used for starting a single line comment. The slash-star (/*) is the
beginning token for multi-line comment, while the star-slash (*/) is used to
stop the multi-line comment.
Control Statement
PXL supports the if statement, the while statement and the for statement.
They also use the same syntax as in the C language. The only exceptions are
that PXL has no break or continue statements to affect looping.
458 | Chapter 18 Pixel Expressions