Allegro has that "Conversion between ordinals and pointers" in few places, and I fixed it by creating an "union" (you know, a "CASE inside RECORD"). Of course it should be sure that integer and pointer are the same size.

IMHO it is a bad practice, even in C and Assembler.