[fpc-devel]bug in comparing of two pchars

Pavel V. Ozerski pavel at insect.mail.iephb.ru
Mon Mar 19 11:01:40 CET 2001


Hello,
please fix a bug.

Symptom:

comparing pchar variable with string constant is not supported by compiler if this constant has one-character length.

Sample:

{$apptype console}
var
 p:pchar;

begin
 if p='TEST'then
  writeln('Correct')
 else if p='T'then
  writeln('Buggy');
end.

Pavel
--
Pavel V. Ozerski            | Inst. of Evolutionary Physiology & Biochemistry,
office +7 (812)552-6870(291)|           Russian Academy of Sciences,
FAX    +7 (812)552-3012     |  Thorez pr. 44, St.Petersburg, 194223, Russia
home   +7 (812)528-5576     |  E-mail:  pavel at insect.mail.iephb.ru
                            |           pavel at insect.ief.spb.su





More information about the fpc-devel mailing list