Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 14 of 14 total
Thread Problem Conversion String to Int
Mon, Oct 12 2015 11:41 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Pasquale,

<< Yes i read.

I converted the variable Identificativo in Double .

the range DOUBLE is not greater ? >>

No.  In JS (the target of the compiler), a number is a number (there are some exceptions to this for bitwise operations, but they're irrelevant here and will only cause confusion).  Only in EWB is there a distinction between integers and doubles.

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Oct 13 2015 10:19 AMPermanent Link

Pasquale

Web Pos srl

ok

but iocome do I handle these numbers ?

You need to do control checks on these numbers that are entered as you can see from the code snippet I posted




Tim Young [Elevate Software] wrote:

Pasquale,

<< Yes i read.

I converted the variable Identificativo in Double .

the range DOUBLE is not greater ? >>

No.  In JS (the target of the compiler), a number is a number (there are some exceptions to this for bitwise operations, but they're irrelevant here and will only cause confusion).  Only in EWB is there a distinction between integers and doubles.

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Oct 13 2015 11:47 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Pasquale,

<< but iocome do I handle these numbers ?  >>

You can't.  You're exceeding the capabilities of the runtime engine that you're using.

<< You need to do control checks on these numbers that are entered as you can see from the code snippet I posted >>

We don't control the JS runtime, the browser does.

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Oct 13 2015 11:49 AMPermanent Link

Raul

Team Elevate Team Elevate

On 10/13/2015 10:19 AM, Pasquale wrote:
> but iocome do I handle these numbers ?

If you need to actually work with them in EWB application then only way
i know how to deal with these is to treat all numbers as strings in EWB
and then use an external javascript big-int library (there are few
available - google for them).

In this case using an external library should be very straightforward
since you just need the library to do the calculations (i.e. no UI
involved).

Note that this is an issue with any Javascript application and not
unique to EWB.


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