Graeme Geldenhuys ha scritto:
Again, nothing like this is hinted at in the documentation. I'll double
check on Monday what the Kylix 3 help says regarding BoolToStr and
StrToBool and localization and when it should actually be used.
Kylix 3 help on TrueBoolStrs variable specifies:
When using
On Fri, 26 Jun 2009 15:54:55 +0100
Henry Vermaak wrote:
> > How come nobody ever noticed this? Does everybody only write English
> > programs. :-)
I _hate_ to think of the consequences of localization of those strings.
Have we had enough of the . and , problem? I don't think we need another
caus
Henry Vermaak wrote:
I think even for config/system files they are useless, since it's a
lot more friendly to support yes/no, true/false and on/off, not just
true/false.
Maybe that was the idea behind the TrueBoolStrs array. Element 0 is true/false,
element 1 maybe yes/no, element 3 maybe on/
Vincent Snijders wrote:
Because I always thought these function were not for users, but for
systems, for example to store a boolean in a xml file or to create an
Your example is a good one and I agree there, but I do think it's for users to.
For example, the whole reason I noticed the trans
Vincent Snijders wrote:
I did not mention StrToBool first, Michael did, and you seemed to ignore
that.
Sorry, that one slipped by me unnoticed
Regards,
- Graeme -
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.n
2009/6/26 Vincent Snijders :
> Graeme Geldenhuys schreef:
>
>> How come nobody ever noticed this? Does everybody only write English
>> programs. :-)
>>
>
> Because I always thought these function were not for users, but for systems,
> for example to store a boolean in a xml file or to create an adh
Graeme Geldenhuys schreef:
How come nobody ever noticed this? Does everybody only write English
programs. :-)
Because I always thought these function were not for users, but for
systems, for example to store a boolean in a xml file or to create an
adhoc dynamic SQL query. You would not want
2009/6/26 Graeme Geldenhuys :
>
> How come nobody ever noticed this? Does everybody only write English
> programs. :-)
Because it's so simple/trivial that everyone rolls their own for user
interfaces? I know I do.
Henry
___
fpc-pascal maillist - fpc-
Graeme Geldenhuys schreef:
Vincent Snijders wrote:
Please add the declaration, to make sure it is StrToBool
I'm not that blind. :-) And the function in question in BoolToStr().
But now that you mention StrToBool(), that is even worse, it hard-codes
I did not mention StrToBool first, Michael
Vincent Snijders wrote:
>
> Please add the declaration, to make sure it is StrToBool
I'm not that blind. :-) And the function in question in BoolToStr().
But now that you mention StrToBool(), that is even worse, it hard-codes
the 'FALSE' and 'TRUE' and doesn't even use the arrays.
How come nobo
Graeme Geldenhuys schreef:
Michael Van Canneyt wrote:
StrToBool should use all elements ?
In FPC 2.2.5 it does not.
implementation =
begin
if UseBoolStrs Then
begin
CheckStrs;
if B then
Result:=TrueBoolStrs[0]
else
Result:=FalseBool
Michael Van Canneyt wrote:
>
> StrToBool should use all elements ?
In FPC 2.3.x (latest trunk) in also doesn't. Looks indentical to 2.2.5
Regards,
- Graeme -
___
fpGUI - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.
Michael Van Canneyt wrote:
>
> StrToBool should use all elements ?
In FPC 2.2.5 it does not.
implementation =
begin
if UseBoolStrs Then
begin
CheckStrs;
if B then
Result:=TrueBoolStrs[0]
else
Result:=FalseBoolStrs[0];
end
else
If
On Fri, 26 Jun 2009, Graeme Geldenhuys wrote:
Michael Van Canneyt wrote:
So all you need to do is initialize them with the localized versions
prior to the first call of BoolToStr().
Thanks Michael. Now the other obvious question, why is TrueBoolStrs and
FalseBoolStrs array types? Why not
Michael Van Canneyt wrote:
>
> So all you need to do is initialize them with the localized versions
> prior to the first call of BoolToStr().
Thanks Michael. Now the other obvious question, why is TrueBoolStrs and
FalseBoolStrs array types? Why not simply of type String?
SetLength(TrueBoolS
On Fri, 26 Jun 2009, Graeme Geldenhuys wrote:
Hi,
I'm busy translating our projects. fpGUI Toolkit uses it's own
translation via .po files (similar to Lazarus projects). But now there
are some output that is not being translated because it is output from
the RTL. One such case is the output o
Hi,
I'm busy translating our projects. fpGUI Toolkit uses it's own
translation via .po files (similar to Lazarus projects). But now there
are some output that is not being translated because it is output from
the RTL. One such case is the output of BoolToStr().
How am I supposed to translate that
17 matches
Mail list logo