Page 2 of 3

Re: SC Format: number fraction handling?

Posted: 17 Nov 2013 20:30
by admin
PeterH wrote:1. test:

Code: Select all

  $NUM = 17,5;
Will work in next version, but you have to quote it since "," happens to be the argument separator in scripting syntax:

Code: Select all

$NUM = "17,5";
PS: Just improved this, now you can do this in Germany:

Code: Select all

$NUM = 17,5;

Re: SC Format: number fraction handling?

Posted: 18 Nov 2013 01:22
by PeterH
admin wrote:Not in v13.30.0006.
Sorry: you are right :oops:
I had downloaded 0006, but not moved it to install directory. So I had installed .0004

Seems I have to check the way I download and move...

Just tested $NUM = 17,5; (with .0007 :roll: ) :arrow: :appl:

Also tested $strDays = format(17,5, "#,0.00"); :arrow: :naughty: not OK
To be true: I didn't expect it to work :biggrin:

So it seems I have to learn that numbers with fractions should be in quotes - especially if in parameter lists...


Finally I see one real problem: scripts defining numeric constants with fractions are dependent from local language. :?
Not nice, I'd say :cry:

Re: SC Format: number fraction handling?

Posted: 18 Nov 2013 08:33
by admin
PeterH wrote:So it seems I have to learn that numbers with fractions should be in quotes - especially if in parameter lists...

Finally I see one real problem: scripts defining numeric constants with fractions are dependent from local language. :?
Not nice, I'd say :cry:
1. Yes, no way around this at the moment. I might find a way later...

2. See 1.

Re: SC Format: number fraction handling?

Posted: 18 Nov 2013 09:35
by armsys
admin wrote:
PeterH wrote:So it seems I have to learn that numbers with fractions should be in quotes - especially if in parameter lists...
Finally I see one real problem: scripts defining numeric constants with fractions are dependent from local language. :?
Not nice, I'd say :cry:
1. Yes, no way around this at the moment. I might find a way later...
2. See 1.
Entschuldigen Sie! :roll: Werden nur deutsche Nummern Probleme mit XY? :?:
Thanks for your follow-up. Later, of course! :biggrin:

Re: SC Format: number fraction handling?

Posted: 18 Nov 2013 09:47
by admin
Yes, only German (and wherever else comma is the decimal separator).

And the next version will solve all those little German problems. :biggrin:

Re: SC Format: number fraction handling?

Posted: 18 Nov 2013 10:02
by Filehero
admin wrote:And the next version will solve all those little German problems. :biggrin:
Du hast die Rente wieder sichää gemacht?

Re: SC Format: number fraction handling?

Posted: 18 Nov 2013 10:07
by admin
Ja, aber nur meine eigene. :biggrin:

Re: SC Format: number fraction handling?

Posted: 18 Nov 2013 10:11
by Enternal
Ich verstehe nicht Deutsch. Ich hoffe, es reparieren zu lassen. Viel Glück! :)

Re: SC Format: number fraction handling?

Posted: 18 Nov 2013 10:15
by armsys
Filehero wrote:Du hast die Rente wieder sichää gemacht?
Bundesnachrichtendienst vielleicht die Antwort für Sie. :mrgreen:
admin wrote:Ja, aber nur meine eigene. :biggrin:
Wow! Plötzlich sind wir alle Deutsch sprechen. Dank Don! :appl:

Re: SC Format: number fraction handling?

Posted: 18 Nov 2013 10:17
by armsys
Enternal wrote:Ich verstehe nicht Deutsch. Ich hoffe, es reparieren zu lassen. Viel Glück! :)
Ich wusste nicht, dass du ein Deutscher bist! Es tut uns leid Sir! :oops:

Re: SC Format: number fraction handling?

Posted: 18 Nov 2013 10:51
by Enternal
armsys wrote:
Enternal wrote:Ich verstehe nicht Deutsch. Ich hoffe, es reparieren zu lassen. Viel Glück! :)
Ich wusste nicht, dass du ein Deutscher bist! Es tut uns leid Sir! :oops:
Haha! Ich bin nicht deutsch. Ich wünschte, ich kann Deutsch sprechen, aber eigentlich spreche ich die Sprache Google Translate. :whistle:

Re: SC Format: number fraction handling?

Posted: 18 Nov 2013 12:52
by LittleBiG
With Hungarian format settings:

Code: Select all

echo 17.5 * 2; /0
echo format(17.5); /2013.05.17
Not really as advertised.
(by the way the , is the decimal separator)

Re: SC Format: number fraction handling?

Posted: 18 Nov 2013 12:55
by admin
:blackstorm: I need more icons... :evil:

Re: SC Format: number fraction handling?

Posted: 18 Nov 2013 13:02
by PeterH
  • v13.30.0008 - 2013-11-18 12:13
    + Scripting | Math Operations: Now, in German Windows, you can enter
    fractional constants in international format (decimal separator =
    dot) by leaving them unquoted. This is obviously the preferred way
    to go now for locale-independent scripts.
The idea is :appl: :appl: :appl:

Tried to fool it, but :appl:

OK: one problem :evil:
$k = .1;
It seems .1 isn't seen as numeric, so it's *not* converted to ,1
$k = ",1"
works as expected - so ,1 *is* a numeric constant...

Re: SC Format: number fraction handling?

Posted: 18 Nov 2013 13:08
by admin
OK, fix comes.