Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2003-11

Compiler runtime error when using WideString character constant

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

David Butler

Hi

I am using FreePascal 1.9.0[2003/11/05].

For the following code, the compiler crashes with "Runtime error 216 at 0x004467CA".

type
  RR = record
    RA : WideString;
  end;
const
  Z : RR = (RA: 'B');

The compiler does not crash if the 'B' is changed to a string of more than one character, for example 'BB'. Also, if the WideString is changed to String, the compiler does not crash.
Also, it appears to be specific to constant record declarations, because the following compiles fine:

const
  Z : WideString = 'B';

So it seems to only happen with constants of single character WideStrings as a record field in a constant record declaration.

Regards
David

Reply by email

Florian Klaempfl
to David Butler
David Butler wrote 27 lines
Hi I am using FreePascal 1.9.0[2003/11/05]. For the following code, the compiler crashes with "Runtime error 216 at 0x004467CA". type RR = record RA : WideString; end; const Z : RR = (RA: 'B'); The compiler does not crash if the 'B' is changed to a string of more than one character, for example 'BB'. Also, if the WideString is changed to String, the compiler does not crash. Also, it appears to be specific to constant record declarations, because the following compiles fine: const Z : WideString = 'B'; So it seems to only happen with constants of single character WideStrings as a record field in a constant record declaration.

Fixed; thank you for your reports :)

Reply by email