[fpc-pascal] AnsiDequotedStr not return empty for

2008-03-02 Thread zaher dirkey
S := AnsiDequotedStr('', '');

Return in S the same source string for empty quoted.

That also in Delphi, but it is for me wrong.
In fact that make my program working wrong when send UserName=Admin and
Password=, it check password as '' not empty.

-- 
Zaher Dirkey
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] AnsiDequotedStr not return empty for

2008-03-02 Thread Peter Vreman

zaher dirkey wrote:

S := AnsiDequotedStr('', '');

Return in S the same source string for empty quoted.

That also in Delphi, but it is for me wrong.
In fact that make my program working wrong when send UserName=Admin 
and Password=, it check password as '' not empty.


The behaviour is compatible with Delphi and will not be changed.

Peter
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] AnsiDequotedStr not return empty for

2008-03-02 Thread Peter Vreman

That also in Delphi, but it is for me wrong.
In fact that make my program working wrong when send UserName=Admin
and Password=, it check password as '' not empty.


The behaviour is compatible with Delphi and will not be changed.


Might as well remove it then, as it seems to me it's pretty useless this
way, and people can only get confused in case empty things are not
working as expected?


In case always check Delphi documentation to see wether the behaviour 
you see is intentional.


In case of  it is also ambigious what you want. Because  in the 
middle of the string is translated to a single . So you might also 
expect that it returns a single  instead of an empty string.


Peter

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] AnsiDequotedStr not return empty for

2008-03-02 Thread Micha Nelissen
Peter Vreman wrote:
 In case always check Delphi documentation to see wether the behaviour
 you see is intentional.
 
 In case of  it is also ambigious what you want. Because  in the
 middle of the string is translated to a single . So you might also
 expect that it returns a single  instead of an empty string.

Wouldn't it be reasonable to expect the rules are similar to Pascal
itself, with  being a single quote, and '' an empty string ?

Micha
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Wince+DebugLn

2008-03-02 Thread Denis Golovan
Hi, all!

  When trying to debug LCL DebugLn is rather useful.
  AFAIU, decision about logging is carried out on initialization of LCLProc 
unit.
  Debugging ordinary progs is quite comfortable :).

  Wince progs is the other story. As we don't have console on Wince (I mean 
standart M$-made console), I cannot turn on and off debugging on fly 
(as command-line args). Now I must path LCLProc unit to unconditionally enable 
logging. So I have a proposition:

  As we have debugging code included whether debugging turned off or on, maybe 
we can add one argument to InitializeDebugOutput and move it into 
interface section?
  
  For example:

  ...
  procedure InitializeDebugOutput(const FileName:string='');
  ...

  Now I'll be able to call it directly from lpr unit before any other 
statements or even make a unit with initialization calling it and insert it 
before any other unit use (like Memchk in Delphi).

  How do you think?

-- 
Best regards,
Denis Golovan aka MageSlayer
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal