Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 15 of 15 total
Thread money calculations
Wed, Jun 17 2015 11:00 AMPermanent Link

Mike

consultant


> I don't think EWB needs anything more - I have accurate currency in my
> web shop, and I've not had any funny values from adding tax etc.
>

Ideally i could just use a currency type and not have to do the integer
calcs myself.  It's just a useful abstraction that's all.
Wed, Jun 17 2015 11:01 AMPermanent Link

Raul

Team Elevate Team Elevate

On 6/17/2015 10:46 AM, Matthew Jones wrote:
> using EWB and the
> Integer type ensures it stays as an integer.

As long as you don't have to deal in Zimbabwean dollars you will be OK -
US$1 is 35 quadrillion Zimbabwean dollars last i heard with them phasing
it out Smile


Raul
Wed, Jun 17 2015 11:07 AMPermanent Link

Raul

Team Elevate Team Elevate

On 6/17/2015 11:00 AM, Michael Margerum wrote:
>
> Ideally i could just use a currency type and not have to do the integer
> calcs myself.  It's just a useful abstraction that's all.

Do you mean that EWB would do integers underneath still ?

I'm one of the EWB users that does not need currency but the issue i see
is that this would be major amount of work (in EWB).

Dealing with it at compiler level is one thing but then you still need
to go to JSON and other exchange formats and need to interact with
external Javascript (which has no concept of any of this of course).

Not to mention the various DB layer issues that now pop up as
expectation of the EWB developer is that back-end magically will work as
well (at least with EWB Web Server).

Not saying it's not doable but from my perspective it has big impact and
is lot of work (not to mention all the post-support).

Forcing you to use integer or float is more "predictable" - you know up
front what's involved and once you write a helper library you can reuse
it in all the apps.

Raul
Wed, Jun 17 2015 11:56 AMPermanent Link

Mike

consultant

> Do you mean that EWB would do integers underneath still ?
>

That's the point.  I don't really care how he does it.  I just want to
use the pascal currency type.  It's just a nice to have.  Of course i
can do all of the math myself with my own library, but if this tool is
meant to mirror Delphi than i'd think it would support the currency type.



Wed, Jun 17 2015 12:47 PMPermanent Link

Walter Matte

Tactical Business Corporation

It is not suppose to mirror Delphi/Pascal.

It is using Pascal to the extent that it can compile into JS - so the outcome is JS!

Round();  is your friend.

Walter
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image