[fpc-pascal] CRT unit and Windows' terminal

pascalX at piments.com pascalX at piments.com
Sat Oct 14 09:12:18 CEST 2017


On 13/10/17 14:39, James Richters wrote:
> I‘ve tried Writeln(Chr(9556)) but chr() has a limit of 255, and I’ve 
> tried just Writeln(#9556) and while that compiles and runs, it doesn’t 
> produce the correct character.. I have a feeling (but have not tested 
> it) that it keeps cycling around the first 256 characters if you use 
> anything above 255….. pretty sure a character is defined as a byte here.


Thanks for that lengthy description of the problem, much better than 
OP's just describing output as rubbish, or something similar.

since char is a single byte type a large value will just get truncated. 
If you turn on range checking it should return a compiler time error. 
You could check that.

Maybe doing that would cast some light on what is going wrong in CRT as 
well.

P




More information about the fpc-pascal mailing list