Optimizing two‐state case statements in Pascal

L. V. Atkinson · Software Practice and Experience · 1982

Abstract Some recent work implies that user‐defined two‐state scalar variables, as available in Pascal, are a significant improvement on booleans. Accordingly, alternative ways of expressing conditionals suggest themselves. Four different way of expressing the same simple conditional are presented. Two widely available compilers are tested and it is discovered that neither produces the same object code for all four cases. It is argued that the same code should be produced, for at least three of the cases, and the feasibility of this is examined.

Cited by 5 works. doi:10.1002/spe.4380120608

Authors

References