length array of char containing #0 gives different result compared to kylix
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
when asking the length of an array of char which contains an embedded nul character, there is a difference of behaviour as compared to kylix.
Also writeln is affected.
-----------------------------------
KYLIX
-----------------------------------
[root@LINUX4 bugreport02]# dcc -Q project1.pas
Borland Delphi for Linux Version 14.5
Copyright (c) 1983,2002 Borland Software Corporation
21 lines, 0.02 seconds, 137208 bytes code, 7208 bytes data.
[root@LINUX4 bugreport02]# ./project1
string1string2
15
string1string2
15
-----------------------------------
FPC
-----------------------------------
[root@LINUX4 bugreport02]# ppc386 -Sd -v0 project1.pas
Free Pascal Compiler version 2.0.1 [2005/05/24] for i386
Copyright (c) 1993-2005 by Florian Klaempfl
[root@LINUX4 bugreport02]# ./project1
string1
15
string1
7
Additional information:
Reporter: Jan Smout
EMail: jan_smout at skynet dot be
Mantis conversion info:
- Mantis ID: 6030
- OS: All
- Version: 2.0.2
- Fixed in version: 2.0.4