val() doesn't properly check range.
<h3><details><summary>Original Reporter info from Mantis: <small>marco @marcoonthegit</small></summary><small>
- **Reporter name:** Marco van de Voort
</small></details></h3>
## Description:
Bart B. drew my attention to the following issue:
``` pascal
var value : word;
code : Longint;
begin
Val('4294901772', Value, code);
writeln(code);
end.
```
returns "10" on Delphi, and "0" with a fairly recent trunk. Note the string constant is larger than 65535, the range of word.
## Mantis conversion info:
- **Mantis ID:** 15633
- **Version:** 2.5.1
- **Monitored by:** » @flyingsheep (Bart Broersma)
issue