Incompatibilities with the C Programming Language

There are features found in the C programming language that are not supported by and not compatible with PSL. This section lists known incompatibilities.

Operators && and

PSL does not perform short-circuit processing of the && and || operators.

  • In C: The && and || functions short-circuit in standard C, meaning that evaluation stops with the first condition that establishes an outcome for the statement. Some programmers use this feature to construct statements that depend on the left-to-right sequential evaluation of the conditions.
  • In PSL: PSL always evaluates all conditions in a statement using && and || operators. Evaluation of all conditions may cause unexpected results in statements that depend on a left-to-right sequential evaluation and short-circuit.

Prefix and Postfix Operators ++ and --

PSL does not distinguish between prefix and postfix operators.

  • In C: Appending ++ or--as a prefix instructs the program to increment or decrement the variable then test the condition, while appending ++ or--as a postfix instructs the program to test the condition before incrementing or decrementing the variable.
  • In PSL: PSL treats both prefix and postfix operators as prefix operators. Treating postfix operators as if they were prefix operators may cause unexpected results in statements that depend on postfix operators.

Break and Continue Statements

PSL supports the function but not the syntax of the break and continue statements. PSL replaces the break statement with the last statement, and the continue statement with the next statement.

PSL treats the C break and continue statements as statements that evaluate the variable name break or continue and produce no output or effect within the PSL program.

Where to go from here

Diagnosing PSL Program Errors

Was this page helpful? Yes No Submitting... Thank you