[fpc-pascal] chr does not return an error when number bigger then byte enters

ik idokan at gmail.com
Wed Nov 14 17:33:54 CET 2012


I'ved started a crossaide against PHP
due to few issues it have such as chr(256) will return ascii "0".
But then I tested it with FPC, and it acts exactly the same, while
many programming languages report on such value range check error.

  writeln(chr(256)); // because it is constant, the compiler only yell warning

Why does FPC allow such value to enter chr without raising something up ?


More information about the fpc-pascal mailing list