commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kwok, Grace" <grace.k...@msci.com>
Subject [jexl] default numeric object type
Date Wed, 25 Jan 2012 01:42:23 GMT
Hi!

>From syntax documentation,
"Float Literals 1 or more digits from 0 to 9, followed by a decimal point and then one or
more digits from 0 to 9, optionally followed by f or F, eg 42.0 or 42.0f.
Double Literals 1 or more digits from 0 to 9, followed by a decimal point and then one or
more digits from 0 to 9 suffixed with d or D , eg 42.0d."

I would like to make double as the default instead of float.
So, if user types "5.67894056844 + 1.0", I would like these two numbers to be converted to
double for calculation.
Is there a way around?

The problem is that the end client who is typing this formula is not a programmer and could
not be expected to attach a "d" to the number.

Thanks a lot for your help,
Grace

________________________________
This email message and any attachments are for the sole use of the intended recipients and
may contain proprietary and/or confidential information which may be privileged or otherwise
protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not an intended recipient, please contact the sender by reply email and destroy
the original message and any copies of the message as well as any attachments to the original
message. Local registered entity information: http://www.msci.com/legal/local_registered_entities.html

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message