Re: Does Beanshell Support Numeric Literals with Underscores?
Alexey Zinger <inline_four-/[email protected]> Thu, 11 Jun 2015 07:59:12 -0400
| Newsgroups | gmane.comp.java.beanshell.user |
|---|---|
| Message-ID | <[email protected]> |
I did not know you could do that in Java until your email :) My understanding is that Bean Shell was written using an old pre-Java 5 grammar, so binary integers and underscores are not supported. This particular project is in limbo, but there is at least one Bean Shell fork you may want to check out for latest developments: https://code.google.com/p/beanshell2/ On 2015-06-10 16:39, Edward Wong wrote: > I apologize in advance if this isn't the right place to email this question. I'm trying to write some scripts in which I use binary values along with underscores to make it easier to read. > > For Example: > > int BIT_MASK = 0b1000_1111; > > However when I try running this, I get an error that looks like this: > > *** User input parse error at line 1, column 17. Encountered: b1000_1111 > > Is it correct that "Numeric Literals with Underscores" isn't supported in Beanshell? Are there any plans to make it work? > > ~ Edward Wong > ------------------------------------------------------------------------------ > _______________________________________________ > Beanshell-users mailing list > Beanshell-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/beanshell-users ------------------------------------------------------------------------------