How is a integer created as a character code constant?
I am building some test cases for integer/1 using SWI-Prolog. ISO/IEC 13211-1 gives a BNF definition for integer and one of the alternatives for integer is for a character code constant . I am able to create and test examples of all the other alternatives using integer/1 but for character code constant I cannot create a valid example. (see below) How is an integer as a character code constant created that will return true using integer/1 ? Answer Thanks to @false. integer(0'0). true. integer(0'9). true. integer(0'a). true. integer(0'\n). true. Usefulness X is 0'\n. X = 10. X is 0b010101. X =