Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #11614

Re: Very interesting : XSharp development roadmap for 2018

From Chris Pyrgas <"chris (at)"@xsharp.eu>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Very interesting : XSharp development roadmap for 2018
Date 2018-05-12 18:52 +0300
Organization Aioe.org NNTP Server
Message-ID <pd72gq$a15$1@gioia.aioe.org> (permalink)
References (3 earlier) <jag9fd1pb07tjpf7fff0mjrik61na7crpd@4ax.com> <pd44cg$1hf1$1@gioia.aioe.org> <f5lbfd1pr9hu2sja9deqc9s5ldc12tumsa@4ax.com> <flm5tsFa7f5U1@mid.individual.net> <b6scfd9ohkm07ps32a71hg4fudd7578mcu@4ax.com>

Show all headers | View raw


Hi Dick,

>> I can give you a feature that alone outweighs all others (from a
>> accounting software developers standpoint): the decimal datatype.
>
>
> What is the advantage above a float?

Please compile and run the following code in VO:

FUNCTION Start() AS INT
LOCAL n AS INT
LOCAL fMoney := 0.00 AS FLOAT

FOR n := 1 UPTO 10000
	fMoney += 0.01
NEXT

? fMoney // prints 100.00
? "Is 100.00 equal to", fMoney, "? :", fMoney == 100.00
// RETURNS FALSE!
WAIT
RETURN 0

This should put the value of 100.00 in the fMoney local, right? Well, 
the comparison of fMoney == 100.00 returns false! That's because floats 
cannot represent decimal numbers with precision (due to their binary 
format), so they lack precision. With just a couple operations on them 
you're fine, but once you start making complex calculations, this lack 
of precision propagates and you can end up with a calculation result 
very different than the real one.

The Decimal type in .Net fixes this problem, by storing decimal numbers 
with full precision. Drawback is that their performance is lower than 
floats, or REAL8s/REAL4s, but at least they are guaranteed to be accurate.

Chris

ps. VO uses SetFloatDelta() in order to workaround this problem, you can 
specify (it works in X#, too) what difference between numbers must be 
treated as unimportant so that comparisons return true. The moer 
calculations you are doing with floats, the more you need to increase 
this number. And you can end up with comparions returning true for 
numbers that are very different and the inherent lack of correct decimal 
representation of FLOAT is always there...



>
>> Then I see collections, interfaces, generics and typed init methods as
>> advantage, and the one line syntax for properties are a real time saver.
>
> Collections: agreed.
> Interfaces: see previous posts. Except in 1 case I only see it as more
> code without any advantage.
> Typed init methods: ok, could be useful
> One line syntax for properties: no idea what this is
>
>> And the come all the source code samples, the 3rd party libraries and a
>> lot more.
>
> Sure, that could be one of the main advantages. However, my guess is
> that most of the VO users maintain programs which rarely need
> functionality not already present in VO, FabTools and a few of the
> other libraries and samples made in VO.
>
> Dick
>

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Very interesting : XSharp development roadmap for 2018 stavros.spanos2@gmail.com - 2018-05-02 03:30 -0700
  Re: Very interesting : XSharp development roadmap for 2018 D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2018-05-09 23:49 +0200
    Re: Very interesting : XSharp development roadmap for 2018 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2018-05-10 07:53 +0200
      Re: Very interesting : XSharp development roadmap for 2018 D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2018-05-11 00:32 +0200
        Re: Very interesting : XSharp development roadmap for 2018 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2018-05-11 12:06 +0200
          Re: Very interesting : XSharp development roadmap for 2018 D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2018-05-11 12:26 +0200
        Re: Very interesting : XSharp development roadmap for 2018 Chris Pyrgas <"chris (at)"@xsharp.eu> - 2018-05-11 16:05 +0300
          Re: Very interesting : XSharp development roadmap for 2018 D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2018-05-11 20:11 +0200
            Re: Very interesting : XSharp development roadmap for 2018 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2018-05-11 20:32 +0200
              Re: Very interesting : XSharp development roadmap for 2018 D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2018-05-12 16:57 +0200
                Re: Very interesting : XSharp development roadmap for 2018 Chris Pyrgas <"chris (at)"@xsharp.eu> - 2018-05-12 18:52 +0300
                Re: Very interesting : XSharp development roadmap for 2018 D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2018-05-15 00:06 +0200
                Re: Very interesting : XSharp development roadmap for 2018 Chris Pyrgas <"chris (at)"@xsharp.eu> - 2018-05-15 01:44 +0300
                Re: Very interesting : XSharp development roadmap for 2018 D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2018-05-15 12:36 +0200
                Re: Very interesting : XSharp development roadmap for 2018 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2018-05-13 15:01 +0200
            Re: Very interesting : XSharp development roadmap for 2018 Chris Pyrgas <"chris (at)"@xsharp.eu> - 2018-05-12 16:53 +0300
              Re: Very interesting : XSharp development roadmap for 2018 Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2018-05-13 10:08 +0200
                Re: Very interesting : XSharp development roadmap for 2018 Chris Pyrgas <"chris (at)"@xsharp.eu> - 2018-05-13 16:01 +0300
                Re: Very interesting : XSharp development roadmap for 2018 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2018-05-13 15:12 +0200
              Re: Very interesting : XSharp development roadmap for 2018 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2018-05-13 15:13 +0200
                Re: Very interesting : XSharp development roadmap for 2018 Chris Pyrgas <"chris (at)"@xsharp.eu> - 2018-05-13 16:54 +0300
                Re: Very interesting : XSharp development roadmap for 2018 Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2018-05-13 17:55 +0200
                Re: Very interesting : XSharp development roadmap for 2018 Chris Pyrgas <"chris (at)"@xsharp.eu> - 2018-05-13 19:37 +0300
                Re: Very interesting : XSharp development roadmap for 2018 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2018-05-13 19:03 +0200
                Re: Very interesting : XSharp development roadmap for 2018 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2018-05-13 18:40 +0200
                Re: Very interesting : XSharp development roadmap for 2018 Chris Pyrgas <"chris (at)"@xsharp.eu> - 2018-05-14 00:33 +0300
                Re: Very interesting : XSharp development roadmap for 2018 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2018-05-14 06:08 +0200
                Re: Very interesting : XSharp development roadmap for 2018 Chris Pyrgas <"chris (at)"@xsharp.eu> - 2018-05-14 15:50 +0300
                Re: Very interesting : XSharp development roadmap for 2018 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2018-05-14 16:01 +0200
                Re: Very interesting : XSharp development roadmap for 2018 Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2018-05-14 15:13 +0200
                Re: Very interesting : XSharp development roadmap for 2018 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2018-05-14 16:03 +0200
              Re: Very interesting : XSharp development roadmap for 2018 D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2018-05-15 00:08 +0200
                Re: Very interesting : XSharp development roadmap for 2018 Chris Pyrgas <"chris (at)"@xsharp.eu> - 2018-05-15 02:07 +0300
                Re: Very interesting : XSharp development roadmap for 2018 D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2018-05-15 12:17 +0200
                Re: Very interesting : XSharp development roadmap for 2018 Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2018-05-15 13:41 +0200
                Re: Very interesting : XSharp development roadmap for 2018 Chris Pyrgas <"chris (at)"@xsharp.eu> - 2018-05-15 16:13 +0300
                Re: Very interesting : XSharp development roadmap for 2018 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2018-05-15 05:41 +0200
        Re: Very interesting : XSharp development roadmap for 2018 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2018-05-11 15:57 +0200
          Re: Very interesting : XSharp development roadmap for 2018 D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2018-05-11 19:36 +0200
            Re: Very interesting : XSharp development roadmap for 2018 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2018-05-11 20:37 +0200

csiph-web